You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The get_by function is returning old values of an entry if they match the clauses passed in and the most recent one does not. We need to check that the item being returned is the most recent, else we should return nil.
We can do this by performing a get call on the item's entry id once we have it, then comparing the results to make sure they match. This will add an extra query though, so it would be better to add this check to the original query. If anybody has time to make this improvement, please do.
The text was updated successfully, but these errors were encountered:
The
get_by
function is returning old values of an entry if they match the clauses passed in and the most recent one does not. We need to check that the item being returned is the most recent, else we should return nil.We can do this by performing a
get
call on the item's entry id once we have it, then comparing the results to make sure they match. This will add an extra query though, so it would be better to add this check to the original query. If anybody has time to make this improvement, please do.The text was updated successfully, but these errors were encountered: