FYI, there _will_ be a fancy OR syntax in 1.0, but it's not fleshed  
out yet. If you have suggestions feel free to ping dkubb or someone  
else who knows what their doing ;)


On Dec 22, 2008, at 4:20 PM, Jon Hancock wrote:

>
> Nathan,
> thanks...not sure why I didn't try that amongst the other things I was
> trying ;).  Maybe 5am is a bit late for coding ;).
> Jon
>
> On Dec 23, 5:08 am, Nathan Herald <[email protected]> wrote:
>> You can still do :conditions => [] rails style.
>>
>> On Dec 22, 2008, at 3:36 PM, Jon Hancock wrote:
>>
>>
>>
>>> In much older versions of dm, I could do things like:
>>
>>> count("(shell_user_id = #{user.id}) OR (shadow_user_id =  
>>> #{user.id})")
>>
>>> or
>>
>>> all(:conditions => ["(shell_user_id = ?) OR (shadow_user_id = ?)",
>>> user.id, user.id], :limit => per_page, :offset => offset, :order =>
>>> [:begin_at.desc])
>>
>>> Now, it seems there is no such way to do this unless I drop down  
>>> into:
>>
>>> repository(:default).adapter.query  and write the entire statement.
>>
>>> The bottom line is sometimes I need to do basic OR operations and
>>> would hate to have to bypass all the higher level features to do it.
>>> Is this the case, or am I missing something?
>>
>>> thanks, Jon
> >


--~--~---------~--~----~------------~-------~--~----~
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