Jonathon Anderson wrote:
>
> I'm using an orm configuration with a sessionmaker().mapper doing the
> mapping between my classes and my metadata.
>
> The documentation says that doing a Session.clear() should do the
> equivalent of a Session.expunge(inst) for all instances attached to
> the session.
>
> I have one instance attached to the session, and do a Session.clear();
> but if I then re-query to get that instance, I get
>
> InvalidRequestError: Could not update instance '[EMAIL PROTECTED]',
> identity key (<class 'cobalt.model.base.Job'>, ('localhost', 0),
> None); a different instance with the same identity key already exists
> in this session.
>
> If I replace the Session.close() with a Session.expunge(inst), the
> error goes away.

thats a bug.  can you reproduce it on trunk, and send us a test case please?

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

Reply via email to