Hey guys

In my model I have a Post(ActiveMapper) class, and a table posts_rel(id 
int primary key, parent_post_id int, child_post_id int). I need to be 
able to define two many_many relations on my Post class, one that 
represents:

"select post.* from posts, posts_rel where posts_rel.child_post_id = 
post.id and posts_rel.parent_post_id = %s" % (self.id)

(ie, all the child posts for this post)

And one that represents:

"select post.* from posts, posts_rel where posts_rel.parent_post_id = 
post.id and posts_rel.child_post_id = %s" % (self.id)

(ie, all the parent posts - or all the posts for which this post is a child)

With the current many_to_many relations I can't see a way to specify 
which columns to join on, could someone give me a hand please?

Thanks

-Rob

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" 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/turbogears
-~----------~----~----~----~------~----~------~--~---

Reply via email to