[odb-users] Type Mapping Question

Sum, Eric B eric.b.sum at lmco.com
Tue Oct 9 17:13:19 EDT 2012


Hi,

I am using a sqlite database and am trying to create a custom mapping of my own C++ struct to a "BLOB" type in sqlite.  I am following odb-examples/mapping as a guide.  I see in this example that in the person class, it has a date member, and the customized traits specialization for the date class allows odb to understand how to map the date member to its specified representation in the database when persisting and how to load the database representation into a date object.

My question is will odb handle the case where there is not just one individual date member of the person class but rather a container of it?

In other words, if there was std::vector<date> as a member of person, would odb still handle this correctly with the same traits specialization?  My guess is yes, but I just want to check.

Thanks,
Eric


More information about the odb-users mailing list