Re: [sqlalchemy] How to use make_transient() to duplicate an SQLAlchemy mapped object?

2015-05-23 Thread Mike Bayer
On 5/23/15 11:52 AM, c.bu...@posteo.jp wrote: Hi Mike, thanks for your help. On 2015-05-22 02:32 Mike Bayer wrote: if you copy an object to transient, now instance_state.key is gone, next step is erase the primary key column-holding attributes, such as myobject.id = None. object on flush

Re: [sqlalchemy] How to use make_transient() to duplicate an SQLAlchemy mapped object?

2015-05-23 Thread c.buhtz
Hi Mike, thanks for your help. On 2015-05-22 02:32 Mike Bayer wrote: > if you copy an object to transient, now instance_state.key is gone, > next step is erase the primary key column-holding attributes, such as > myobject.id = None. object on flush will have no PK value and > autoincrement w

Re: [sqlalchemy] How to use make_transient() to duplicate an SQLAlchemy mapped object?

2015-05-21 Thread Mike Bayer
On 5/22/15 1:10 AM, c.bu...@posteo.jp wrote: I opened a questions with example (pseudo) code on stackoverflow for that. I know the question how to duplicate or copy a SQLAlchemy map

[sqlalchemy] How to use make_transient() to duplicate an SQLAlchemy mapped object?

2015-05-21 Thread c.buhtz
I opened a questions with example (pseudo) code on stackoverflow for that. I know the question how to duplicate or copy a SQLAlchemy mapped object was asked a lot of times. The answer a