Howdy!

I have n through an association, but when I try to order them they get
grouped by the through association. Is there a way to get them ordered
without the grouping?

Here is an example of the scenario, and what I would like to get.
http://pastie.org/2043160

Any thoughts? Thanks!

class Person
  has n, :posts
  has n, :comments, :through => :posts
end

class Post
  belongs_to :person
  has n, :comments
end

class Comment
  belongs_to :post
  has 1, :person, :through => :post
end

What I get

Person#comments.all(:order => :created_at) #=> [<Comment 1, Post 1>,
<Comment 3, Post 1>, <Comment 2, Post 2>]

What I want

Person#comments.all(:order => :created_at) #=> [<Comment 1, Post 1>,
<Comment 2, Post 2>, <Comment 3, Post 1>]

-- 
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