Thanks Will for the comprehensive response.

> To answer your question more directly though, I think you are probably
> looking for the :uniq option.  I haven't tested to see where this is
> available on arel-based queries, but it does what you want on
> ActiveRecord 2.x's associations - return only one of any given record
> even if it appeared multiple times in the query resultset.  (Kind of a
> hack though in this case, the ORM layer shouldn't have to throw away
> excess query results.)
>

The system we are retiring actually does this for some queries (throws
stuff away), and this was one of the factors that drove us to look at
alternatives. I can say from bitter experience with radionz.co.nz that
this approach (getting stuff, filtering in memory, throwing away) does
not scale.

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

Reply via email to