Re: [sqlalchemy] one to many relation, removing and adding list issue

2010-08-26 Thread Michael Bayer
On Aug 25, 2010, at 7:02 AM, Martin-Leon Francois wrote: assert(len(o1.to_many) == 2) #this assert fails why? OK so as of r2e09679be06b, your original test now returns: sqlalchemy.exc.InvalidRequestError: Instance 'Many at 0x12922f0' has been deleted. Use the make_transient() function to

[sqlalchemy] one to many relation, removing and adding list issue

2010-08-25 Thread Martin-Leon Francois
Hi, I am trying in the same session to detach an instance from a collection ( one to many) flush and commit everything (all is ok) and then attach the removed instance again. unsuccessfully. in below code, last assert fails. I don't understand why I am not able to append m2 to o1.to_many