Hey, Michael Bayer wrote: > OK well I'm sure you noticed that RelationProperty was not designed to be > subclassed.
Yeah, my subclass isn't pretty. :) > I would advise that your my_own_relation() function generate > its own primaryjoin and secondaryjoin conditions which it passes as > arguments to the relation(). If you look at the source of > _determine_joins(), it uses the table.join(othertable).onclause idea, but > more cleanly through a utility function called join_condition(). it > calls it twice to accommodate some more exotic use cases. I think in > general its fine to call as join_condition(prop.parent, prop.target) which > will give you what you need. Thanks, I know all about _determine_joins() now that I wrestled with the subclassing approach, and will try to rewrite my code so it uses a similar approach. We'll see how it turns out. Regards, Martijn --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to sqlalchemy+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---