Yeah... I'm pretty newbie myself with sqlalchemy, so when I discovered
that I could specify primary joins, secondary... and all that juicy
stuff in the "backref" I got so into writing it from A -- to --> B
that I forgot that it can be done B <--from-- A

:) Thanks again!

2010/11/12 Eric Ongerth <ericonge...@gmail.com>:
> You're welcome, and I hope that works for you.  I went through the
> same process a few years ago when picking up SqlAlchemy... the backref
> facility is so cool that it's easy to forget that it's optional and
> that most relationship backrefs /could/ be handled as just another
> relationship on the opposite mapper.
>
> On Nov 12, 7:31 am, Hector Blanco <white.li...@gmail.com> wrote:
>> 2010/11/12 Eric Ongerth <ericonge...@gmail.com>:
>>
>> > Hi Hector,
>>
>> > If I'm not mistaken, everywhere you wrote
>> > (MyObject.id==MyObject.containerId),
>> > you meant to write: (Container.id==MyObject.containerId).
>>
>> Ups... yeah... great eye.
>>
>> > Instead of the backref technique, why not just create the MyObject--
>> >>Container relationship a single time in your MyObject class.  That
>> > should be able to coexist with your first code example (with no
>> > backrefs).
>>
>> Oh, right!! That's a great approach... I was so blinded with the
>> backref thing that I didn't think it could be the other way around!
>>
>> I'll do that!
>>
>> Thank you Eric!
>
> --
> You received this message because you are subscribed to the Google Groups 
> "sqlalchemy" group.
> To post to this group, send email to sqlalch...@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.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalch...@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.

Reply via email to