I'm playing around with PostGIS and DM at the moment and having some success with custom operators. So, for example, to do a ST_DWithin query, I can do: Shop.all( :location.distance=>[route.location, 0.1] )
The one thing I can't seem to achieve, though, is a custom ORDER BY. There's one query where I need to do ORDER BY ST_Line_Locate_Point(routes.linestring, listings.location) The DM internals seem fairly hard-wired to just do simple :asc and :desc ordering on existing fields. I've played around with patching stuff but can't find any way through this. Any suggestions or should I just give up and stick to SQL for this one? cheers Richard -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To unsubscribe from this group and stop receiving emails from it, send an email to datamapper+unsubscr...@googlegroups.com. To post to this group, send email to datamapper@googlegroups.com. Visit this group at http://groups.google.com/group/datamapper?hl=en. For more options, visit https://groups.google.com/groups/opt_out.