Tried differently, like

locations(:order => [:time.desc], :limit => 1).first.lat

but no luck. The moment I get multiple devices in the original query
of devices the "limit 1" goes away, instead it queries the whole
relation.

 SztupY

On júl. 25, 19:49, Kevin <[email protected]> wrote:
> Try querying it differently, perhaps only .all calls on the
> association:
>
> locations.all(:order => [:time.desc]).first.lat
> or even (should be same thing)
> locations(:order => [:time.desc]).first.lat
>
> -Kevin

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