The words 'left' and 'right' appear nowhere in the source code for the 
dataobjects adapter.

https://github.com/datamapper/dm-do-adapter/blob/master/lib/dm-do-adapter/adapter.rb

I've always seen this as a grave omission where the abstraction makes too many 
assumptions.  We really need to ability to do such things too.

You can do it, but you'll have to drop to using SQL, either directly on the 
adapter to get structs back, or you can try my dm-sql-finders 
https://github.com/d11wtq/dm-sql-finders which will give you a Collection as 
you'd expect.


On 08/12/2011, at 8:07 AM, terminal_breaker wrote:

> Is there a way to do left outer joins in Datamapper without having to
> resort to talking to the data-store directly. I've been searching the
> net and the Datamapper docu with not success on details how to do so.
> 
> For example:
> 
> SELECT p.user_id, p.description, u.user_name
> FROM privileges p
> LEFT OUTER JOIN users u ON (p.user_id = u.id)
> WHERE p.description = "delete rights"
> 
> And let's say that I have a User class and a Privilege class too.
> 
> 
> -- 
> 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.
> 

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