Ah yes that makes more sense now I re-read it!
Thank you so much Dirkjan.

Alas my ruby skills are really not up to scripting the scenario. It
looks like I must delve into my code loops to figure out why DM is
querying associations one row at a time.

Many thanks,
George

On Jan 4, 4:04 pm, Dirkjan Bussink <[email protected]> wrote:
> On 4 Jan 2010, at 16:54, George wrote:
>
> > There is mention of DM's support for ":include => [ :association ]"
> > syntax to eager-load related rows.
> > (I found it athttp://datamapper.org/articles/spotlight_on_laziness.html)
>
> It's is mentioned here that this is the ActiveRecord approach, and this is 
> not how DataMapper works.
>
> > Has the :include option been deprecated or am I using it incorrectly?
> > (Without it I'm getting mutliple queries generated as I loop through
> > the list of clients, reading their addresses etc)
>
> The :include option has never existed... If it's correct you will see 4 
> queries in this case, one for the clients, one for the notes, one for the 
> client_addresses and one for the addresses. If this is not what's happening, 
> please create a script that shows the issue so we can see whether we can fix 
> SEL for the use case you have.
>
> --
> Regards,
>
> Dirkjan Bussink

--

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