TBH, the code can probably be improved to load DataMapper collections 
referencing the Query for the relationship instead of just load Arrays.  It 
would be more correct this way.  I'll have a look at that later.  It was late 
last night when I looked at this ;)

For the purposes of iteration this works fine though.  It would only fall down 
if you tried to invoke a method like #create, #new or #all on one of the 
eager-loaded collections.

Will post back later.


On 17/10/2011, at 5:04 PM, FND wrote:

>> I'll have a play with this later.  I quite enjoy trying to optimize
>> things like this :)
> 
> Chris appears to have solved the issue:
> https://gist.github.com/1244491#gistcomment-56801
> 
> This seems to work like a charm - thanks a lot, Chris!
> 
> 
> -- F.
> 
> -- 
> 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