Describe the feature

Just like ErrRecordNotFound works for "First" queries, can we make it work for "Find" queries as well.

Motivation

Had to write separate logic to handle "Find" queries element not found. so I was thinking that we can do something similar for arrays as well.

Related Issues

Comment From: saeidee

You can enable the RaiseErrorOnNotFound flag before query:

db.Statement.RaiseErrorOnNotFound = true
err := db.Where("name = ?", "foobar").Find(&r).Error // err will be ErrRecordNotFound