[odb-users] std::map key as part of primary key
Alessandro Bellina
abellina at gmail.com
Tue Aug 20 14:38:13 EDT 2013
Hello,
I have turned on tracing in my application, and I am seeing that for my
std::map generated table the way to ODB updates is it deletes everything
related to the foreign key of the parent class.
For example:
#pragma db object
struct Test
{
...
std::map<std::string, int> my_values;
#pragma db id
unsigned long id;
};
First, I insert an item in Test, and that works as expected. But an update
deletes everything for that foreign key and then reinserts. I thought it
would match on the foreign key (Test::id), then the std::map key, and
update that row.
Thoughts?
Thank you
Alessandro
More information about the odb-users
mailing list