Re: Extra queries to fetch associations

2006-12-03 Thread francky06l
Making the association from Image and "belongsTo" would produce one query .. Well just a guess .. On Dec 3, 4:54 am, "Brad Daily" <[EMAIL PROTECTED]> wrote: > Pardon my use of a Rails example here, but that is my reference point. > Let's say I have two models, Album and Image. Obviously: > > Albu

Extra queries to fetch associations

2006-12-02 Thread Brad Daily
Pardon my use of a Rails example here, but that is my reference point. Let's say I have two models, Album and Image. Obviously: Album hasMany Images Image belongsTo Album In Rails, I would do this: albums = Album.find(:all, :include => [ :images ]) Which would produce this query: SELECT album