
DataMapper doesn't correctly query for nil has 1 relationships
Reported by Jonathan Stott (namelessjon) | November 6th, 2009 @ 12:49 PM
See the linked gist:
https://gist.github.com/3d0b0240d6cce20ecac7
But to summarise. When querying for resources which don't have a
child item, via Model.all(:child => nil)
, DM
queries for models where id
is nil, rather than the
correct query.
Comments and changes to this ticket
-
Jonathan Stott (namelessjon) November 6th, 2009 @ 12:50 PM
- State changed from unconfirmed to confirmed
-
Dan Kubb (dkubb) November 9th, 2009 @ 02:08 AM
- State changed from confirmed to resolved
(from [8611d3a9d743be87344a8d6c491b309013972e3c]) Add Query support for :relationship => nil and :relationship.not => nil
- Includes specs to ensure this works with 1:1, 1:m, m:m, m:1 relationships
[#1116 state:resolved] http://github.com/datamapper/dm-core/commit/8611d3a9d743be87344a8d6...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
People watching this ticket
Referenced by
-
1116 DataMapper doesn't correctly query for nil has 1 relationships [#1116 state:resolved] http://github.com/datamapper/dm-c...