Hi list, Could anybody tell me what's wrong with the following code? It's only the code in the poly_assoc example directory (the generic version) where I'm trying to set the polymorphic part of the relationship. It gets me the traceback below and I don't really understand why:
Traceback (most recent call last):
File "poly_assoc_3.py", line 155, in <module>
sess.save(u2)
File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/util.py", line
1550, in func_with_warning
return func(*args, **kwargs)
File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/session.py",
line 1055, in save
self._cascade_save_or_update(state, entity_name)
File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/session.py",
line 1111, in _cascade_save_or_update
self._save_or_update_impl(state)
File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/session.py",
line 1251, in _save_or_update_impl
self._update_impl(state)
File "/home/ged/devel/sqlalchemy/trunk/lib/sqlalchemy/orm/session.py",
line 1241, in _update_impl
"session." % (mapperutil.state_str(state), state.key))
sqlalchemy.exc.InvalidRequestError: Could not update instance
'[EMAIL PROTECTED]', identity key (<class
'__main__.GenericAssoc'>, (1,), None); a different instance with the
same identity key already exists in this session.
--
Gaƫtan de Menten
http://openhex.org
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---
poly_assoc_3.py
Description: application/python
