[odb-users] How to make a exact copy of the object?

Rafal Gm grasmanek94 at gmail.com
Fri Dec 19 04:45:04 EST 2014


I am using a singlethreaded application, but I made ODB process all SQL in
another thread (don't worry I don't use any ODB or related things in the
non-odb thread).

Now, to prevent data races I need to make a exact copy of my structure
(like the hello world person class). But whenever I make a copy and insert
it in the other thread, the copy gets a new id() instead of the old one.
How can I make a 1:1 copy of the object I have the pointer to?


More information about the odb-users mailing list