On Wednesday 05 December 2007 23:36:12 kris wrote:
> with sqlalchemy 0.4.1,
>
> Is there an idiom for delete the children of the object
> without actually deleting the object itself?
>
> I tried
> session.delete (obj)
> session.flush()
> # add new children
> session.save (obj)
> session.flush()
>
> But it gave me the error
>    InvalidRequestError: Instance '[EMAIL PROTECTED]' is already
> persistent
>
> which does not appear correct either.

u'll probably have to first detach the children from the 
parent.relation somehow?

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