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 mike...@zzzcomputing.com 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 =

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 mike...@zzzcomputing.com 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

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

2015-05-22 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. http://stackoverflow.com/questions/30287042/how-to-use-make-transient-to-duplicate-an-sqlalchemy-mapped-object I know the question how to duplicate or copy a SQLAlchemy

[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. http://stackoverflow.com/questions/30287042/how-to-use-make-transient-to-duplicate-an-sqlalchemy-mapped-object I know the question how to duplicate or copy a SQLAlchemy mapped object was asked a lot of times. The answer