Hello,

We are testing the new  __declare_last__ feature with 0.8. We face an issue 
with the after_configured event in an application that use multiple engines.
after_configured event is triggered multiple times (by 
sqlalchemy.orm.configure_mappers), once for each engine.

The problem with this -as far as I understand it- is that the mapper 
registry is shared and that the after_configured subscribers can be called 
multiple times on the same mapper. We end up with exception like this:

ArgumentError: Error creating backref 'herd' on relationship 
'Herd.animals': property of that name exists on mapper 
'Mapper|Animal|animal'

caused by the fact that __declare_last__ is called multiple times on the 
same mappers ... relation being already defined.

Is there a way to prevent this in sqlalchemy ? Or should I prevent this 
using state in my class ?

Thank you for your help.

Jeff

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to