[sqlalchemy] backrefs

2012-01-26 Thread Kent
Is there a straightforward way to determine if a RelationshipProperty has a corresponding reverse (backref)? -- 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

[sqlalchemy] Backrefs vs. defining the relationships by hand

2011-02-24 Thread Hector Blanco
Hello everyone... I'd like to know what do you think it's better: Whether using backrefs or manually defining the relationships one by one. Are the backrefs useful to code less code or do they have other advantages? I.e.: Let's say I have a User and a UserGroup class with (initially) the

Re: [sqlalchemy] Backrefs vs. defining the relationships by hand

2011-02-24 Thread Michael Bayer
On Feb 24, 2011, at 1:20 PM, Hector Blanco wrote: Hello everyone... I'd like to know what do you think it's better: Whether using backrefs or manually defining the relationships one by one. Are the backrefs useful to code less code or do they have other advantages? I.e.: Let's say I

Re: [sqlalchemy] Backrefs vs. defining the relationships by hand

2011-02-24 Thread Hector Blanco
It was a typo! :-) They keep the two sides of a relationship in sync on the python side. I was suspecting using backrefs was better and that it would do some kind of synchronization like that, yeah... But I was hoping that someone would say No, it's the same... Because now I won't sleep soundly

[sqlalchemy] Backrefs and the identity map

2009-08-03 Thread King Simon-NFHD78
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 for the '.master'

[sqlalchemy] backrefs

2008-06-26 Thread az
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(...) having more or less all of the relation(...) arguments, but