Michael Bayer wrote: > > Martijn Faassen wrote: >> >> Hey, >> >> Michael Bayer wrote: >>> Martijn Faassen wrote: >>>> Michael Bayer wrote: >>>>> subclass RelationProperty fine, but don't get involved with >>>>> overriding >>>>> its >>>>> internal _xxx methods. >>>> So: >>>>
specifically regarding backref(), I've simplified the internals for this in trunk rev 6390. The recipe I gave for overriding _determine_joins() still holds, except no knowledge of "backref" is required: class MyRelation(RelationProperty): def _determine_joins(self): self.primaryjoin = join_condition(self.parent.local_table, self.target) & (self.parent.local_table.c.id>0) The entire "backref" calculation now occurs within _generate_backref() at the end of the do_init() procedure, and the BackRef object is gone. http://www.sqlalchemy.org/trac/changeset/6390 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---