AW: [odb-users] object_already_persistent exception and polymorphic
mne at qosmotec.com
Fri Apr 29 10:14:29 EDT 2016
sounds like you catch the exception and then commit the transaction anyway? You should not do that. If you do something like
catch (const odb::exception& e)
std::cerr << e.what () << endl;
then the transaction is rolled-back automatically because ODB's transaction class conforms to the RAII principle.
This should solve your problem.
More information about the odb-users