Hi Erik,

I can verify this is a problem, even in the dkubb/dm-core fork.  It
has to do with the way OneToMany::Proxy#first is implemented to handle
one-to-many associations as well as many to many associations.  IMHO
this was probably not the best approach, it would've been better to
push the many-to-many logic to the ManyToMany::Proxy object instead.
I think that ultimately this is what will end up happening, unless we
are able to factor the code out and just use what's implemented in
Collection.. which is the ideal end result.

For now you should post a ticket at Lighthouse (http://
wm.lighthouseapp.com/projects/4819/) so that it can be fixed in dm-
core.

Dan


On Nov 6, 9:08 am, crantz <[EMAIL PROTECTED]> wrote:
> Hello data mappers,
>
> I've been having some relationship issues for a while now. With the
> DataMapper kind of relationship, I mean. The problem is that #first
> behaves strangely when used with an association whose parent objet is
> part of a collection, or something like that.
>
> Please have a look at the following example:http://pastie.org/308772
>
> I think the underlying reason for this strangeness might be that
> Relationship#get_children is not adapting its query_values correctly
> when finder = :first, but the implementation of that method is a bit
> of a mystery to me, so I wouldn't know for sure. Any ideas?
>
> Erik
--~--~---------~--~----~------------~-------~--~----~
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