[sqlalchemy] Re: backrefs

2012-01-26 Thread Kent
I assume the non public property._reverse_property is just what I'm looking for. :) On Jan 26, 2:06 pm, Kent jkentbo...@gmail.com wrote: Is there a straightforward way to determine if a RelationshipProperty has a corresponding reverse (backref)? -- You received this message because you are

[sqlalchemy] Re: Backrefs and the identity map

2009-08-03 Thread King Simon-NFHD78
I wrote: Hi, Does accessing a backref always have to issue SQL, even if the object to be loaded already exists in the identity map? For example, if I have a many-to-one lazy-loaded relationship from Master to Detail with a backref, the statement master.details[0].master will issue SQL

[sqlalchemy] Re: Backrefs and the identity map

2009-08-03 Thread Michael Bayer
King Simon-NFHD78 wrote: to master_id = sa.Column(sa.Integer, sa.ForeignKey(Master.__table__.c.id)) ...and now it seems to work! So is this a bug? yes, that would be a bug. There are some other scenarios where this kind of thing occurs (lazy clause doesn't optimize) related to

[sqlalchemy] Re: Backrefs and the identity map

2009-08-03 Thread King Simon-NFHD78
Michael Bayer wrote: King Simon-NFHD78 wrote: to master_id = sa.Column(sa.Integer, sa.ForeignKey(Master.__table__.c.id)) ...and now it seems to work! So is this a bug? yes, that would be a bug. There are some other scenarios where this kind of thing occurs (lazy clause

[sqlalchemy] Re: backrefs

2008-06-26 Thread Michael Bayer
On Jun 26, 2008, at 7:22 AM, [EMAIL PROTECTED] wrote: hi just an idea: is it possible to have half-baked backref-declarations? i want to use the SA's way of inventing backrefs from a name, and just provide some extra arguments to that invention. instead now i have a full backref(...)

[sqlalchemy] Re: backrefs

2008-06-26 Thread Michael Bayer
On Jun 26, 2008, at 1:22 PM, [EMAIL PROTECTED] wrote: sort of, x: relation( Foo, primaryjoin=, secondaryjoin=,remote_side=,whatever, backref= halfbackref(name=abc,post_update=True)) and let it construct the backref from relation.primary/secondaryjoin etc, putting name and whatever