I was able to figure that out eventually. Thanks for listing all the options!
On Apr 12, 9:10 am, mltsy <j...@ownlocal.com> wrote: > > Now if I could just figure out how to query on a many-to-many. > > Querying shouldn't be too hard - have you figured it out? > > You can use: > @photo.albums > @album.photos(:person => p) > @person.photos(:album => a) > Photos.all(:album => a, :person => p) (to get all photos from person p > in album a) > or even > Albums.all('photos.person' => p) (to get all albums containing at > least 1 photo from person p. This only works using the string syntax) > > -Joe -- You received this message because you are subscribed to the Google Groups "DataMapper" group. To post to this group, send email to datamapper@googlegroups.com. To unsubscribe from this group, send email to datamapper+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/datamapper?hl=en.