[odb-users] Custom session example code (in test project)

Alessandro Bellina abellina at gmail.com
Mon Jun 23 00:32:39 EDT 2014


Hello Boris

In odb-test, you have a custom session example. I wanted to ask you if you
could explain the significance of the flush function, and the mark function.

>From the test.hxx code I can see that there is special change tracking code
performed to see if an object has changed state (updated() function). From
the driver.cxx, I believe that the flush will translate changes detected
using updated(), into an .update operation altering the state of the
objects. On a commit, you then execute a hook to mark the objects "changed".

My question is, if I just want a session that stores objects for me, such
that I can find them by key later on... and I don't care about the change
tracking, do I need to worry about flushing?

Thanks

Alessandro


More information about the odb-users mailing list