On Feb 8, 2008, at 1:06 PM, Mike Bernson wrote:

>
> I have a case where a delete was requested and on the commit to the  
> transaction the delete fails with a
> integrity error. Problem is a foreign key constraint will not let  
> the record be delete. Now I have a
> session which tries to delete this record any time I flush things. I  
> have rolled back the transaction
> and now want to stop the session from delete the record.
>
> How do I stop the record from being marked as needed to be delete ?

ooh, we don't have a specific method for that atm.  i think you'd have  
to expunge() it then put it back in using save_or_update().  you can  
also probably do the (non-public) equivalent of what an "undelete()"  
method would do, which is "del session.uow.deleted[obj._state]".  we  
can add an undelete() which does it too.


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to