AW: [odb-users] Problem with session cache and weak_ptr

Marcel Nehring mne at
Tue Apr 26 11:26:58 EDT 2016

Hi Boris,

> Are you sure ODB is loading the same object as the one containing the expired weak_ptr member? If it were a different object, then that would explain the behavior you are observing.

Yes, I am pretty sure. What I do is load all objects with the weak_ptr member from the database, invalidate the weak_ptr, again load all objects from the database. The result is, that the weak_ptr are still expired but the objects they should point to are in my cache.

I can double check and try to reproduce the problem tomorrow. I guess the problem should be reproducible with ODB's original session if I invalidate the weak_ptr manually. If this is true I could provide a test case.


More information about the odb-users mailing list