[odb-users] Enforcing primary key in 1-N relationship

Boris Kolpackov boris at codesynthesis.com
Wed Nov 28 08:57:45 EST 2012


Hi Davide,

Davide Anastasia <Davide.Anastasia at qualitycapital.com> writes:

> Would you consider this as a feature request? :)

Yes, this is on our TODO though with a fairly low priority. The way
I currently see this being handled in the future is through the set
containers. std::vector does not prohibit duplicate elements while
std::set does. So, in the future, if you use std::set, ODB will
automatically generate the constraint on the resulting table.

Boris



More information about the odb-users mailing list