On Thursday, May 14, 2015 at 3:56:19 PM UTC-7, Janko Marohnić wrote:
>
> And eager_graph works normally with Dataset#first as is currently 
> implemented? Yes, usually you don't have to eager load, unless you have 
> associations more than one level deep, then you need it.
>

No, eager_graph is designed to be used with #all, and returns plain hashes 
if called with each (or first which calls each).  Basically, if you use 
eager or eager_graph, you should call #all.  If you know you are only 
loading a single record, don't eager load.  If you are loading a single 
current record and want to eager load nested associated records, do the 
eager loading just for the associated records (e.g. by passing a block to 
the association method), don't attempt to eager load for the single record.

Thanks,
Jeremy

-- 
You received this message because you are subscribed to the Google Groups 
"sequel-talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sequel-talk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to