On Tuesday, March 3, 2015 at 4:41:20 PM UTC-5, Michael Bayer wrote:
>
> Essentially the issue is likely because the mappings in these two examples 
> are not equivalent; the reflection based version has Widget.frobnicator 
> and 
> Frobnicator.widget communicating with each other through a backref, and 
> the 
> declarative version does not. 
>

Thanks, Michael.  Yes, we're on SQLAlchemy 0.9.  We used a script to 
generate the declarative models by introspecting on the reflective ones, 
and in the process it turned a relationship defined once with a backref 
into two relationships defined without using the backref keyword.  We 
missed that the backref argument is responsible for the event listeners as 
well as for creating the relationship on the other model.

Adding the back_populates argument to the model declarations fixes our 
issue.

Thanks,
Evan James

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sqlalchemy+unsubscr...@googlegroups.com.
To post to this group, send email to sqlalchemy@googlegroups.com.
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/d/optout.

Reply via email to