Hi all,
I want to build a simple join in an association:
(collapsed)
def Account
(if not needed, no has n, :posts here!)
end
def Post
belongs_to :account
end
posts = Post.all = 1 query
posts.each do |post|
post.account.name = more 1 query
end
I think if is possible to make this example build only 1 query instead
2.
Thank you guys!
--
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.