On Jan 14, 2008, at 2:32 PM, maxi wrote:
>
> Hi,
> Follwing with my 0.3 to 0.4 upgrade, now I get the next problem...
>
> When I try to save an object across my session, I get an
> InvalidRequestError exception with the message:
>
> File "c:\programs\python25\lib\site-packages\sqlalchemy-0.4.2p3-
> py2.5.egg\sqlalchemy\orm\session.py", line 988, in _save_impl
> raise exceptions.InvalidRequestError("Instance '%s' is already
> persistent" % mapperutil.instance_str(instance))
> InvalidRequestError: Instance '[EMAIL PROTECTED]' is already
> persistent
>
>
> Why with 0.3 I had not this error?
use session.save_or_update() for an instance where you arent sure if
its persistent or not. this is the same API as in 0.3, 0.3 just has a
bug where no error is raised.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---