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
{{ message }}
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.
If you ask a Repository to read the records for a valid query which returns an empty set, you get an empty set.
If you ask a Repository to read the records for an invalid query, you get an empty set.
It is impossible to determine the difference between these results.
Can we change the behaviour for an invalid query to raise an error?
Yes there were some discussions about that already and yes we want to change that behavior. Can't say when exactly it'll happen tho but I think it's safe to assume this change will make it into release 1.2.
Is there any reason why someone should be relying on the current behaviour with an invalid query?
It would seem that changing this would only make it less likely that people are hitting cases where their queries are not actually executed.
@solnic, @emmanuel. Id like to tackle this since I was bid by this multiple times. It has become better since we merged the "raise on invalid property" patches but you can still easily create an invalid query. You'll accept a pull request for 1.3?
If you ask a Repository to read the records for a valid query which returns an empty set, you get an empty set.
If you ask a Repository to read the records for an invalid query, you get an empty set.
It is impossible to determine the difference between these results.
Can we change the behaviour for an invalid query to raise an error?
https://github.com/datamapper/dm-core/blob/master/lib/dm-core/repository.rb#L160-163
The text was updated successfully, but these errors were encountered: