On 4 Jan 2009, at 04:52, deadwards wrote:

> Ok, I'm very new to DataMapper (with Merb), and I have a stupid
> question.  How do I do an 'OR' select on a model.  After all of my
> searching, I can only find selects that only use 'AND' conditions.  Is
> it possible to do an 'OR' find?  If so, how?

For now you have to use the :conditions option of a finder, but we are  
working on designing an API that allows for easy OR's. This is an  
example of how you could do it now:

User.all(:conditions => ["username = ? OR password = ?", username,  
password])

-- 
Regards,

Dirkjan Bussink

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to