AW: [odb-users] Problem with session cache and weak_ptr
mne at qosmotec.com
Mon May 9 06:03:13 EDT 2016
Thanks for having a look!
I can understand that you argue that it is expected behavior from ODB's point of view. I cannot explain to my colleagues, however, that our database access layer returns invalid objects. ;)
In the meantime I addressed the issue with a similar solution to Andrew Cunningham's auto-loading lazy pointer.
I changed all weak pointer to lazy pointer and automatically load the pointed to object when it is accessed in case the pointer is invalid/expired. So far this works and is fast enough.
More information about the odb-users