I've created a patch in lighthouse for this and looking for a bit of
feedback.

Essential the problem is due to MySQL (and perhaps other database
vendors) of returning an empty result set for:

select * from somewhere where name in (null)

regardless of whether there are records with null entries in that
field. the version that does work is:

select * from somewhere where name is null

with active record this means that the following does not return the
expected records:

Event.find(:all, :conditions => {:venue_id => [1,2,nil]})

http://rails.lighthouseapp.com/projects/8994/tickets/1486-active-record-conditions-to-deal-with-nils-in-arrays

cheers,
n

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to