Other than using DM 1.0.2, which does support the first syntax you
provided, I suspect you might be doing it the best way that is
possible on 0.10.2

Regards
Jon

On 4 October 2010 15:44, George <[email protected]> wrote:
> In order to get a query like this to work:
>  ExchangeRate.all( :conditions => ['rate = new_rate'] )
>
> We've had to trick DM into accepting the condition by using this
> syntax:
>  ExchangeRate.all( :conditions => ['rate = new_rate AND 1 = ?', 1] )
>
>  This results in "...WHERE (rate = new_rate AND 1 = 1)..." which
> works ok.
>
> Is there a better way to achieve this?
> (Using dm version 0.10.2 BTW)
>
> George

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