Hi -- I'm trying to implement persistence with SOCI in a C++ project I'm
working on, but am coming a little unstuck when saving models that need to
know their parent's id for persistence. Which is most of the objects!
I've tried creating a std::pair (with child and parent domain classes)
specialisation for the type_conversion template, and this does work, but it
requires me to either relax security on my models, or to create a
specialisation for const and non-const members.
I really don't want to burden my domain classes any more than I have (I've
compromised and given them id() and set_id() members).
So I thought I'd ask here what approaches other people have taken?
I'm no C++ guru, but I can read slowly, with my lips moving if needs be. ;)
Cheers,
Doug.
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
soci-users mailing list
soci-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/soci-users