[odb-users] Problem with session cache and weak_ptr
Boris Kolpackov
boris at codesynthesis.com
Wed May 4 13:37:42 EDT 2016
Hi Marcel,
Thanks for the test case. While I am not sure this is the same situation
as in your original case, but I can explain what's going on here: in
this test you invalidate the weak pointer from employees to employers
but the employee objects still remain in the cache. When you load them
again, ODB first checks the cache and finds them there. In this case
ODB assumes that the object in cache is valid/fully loaded and simply
returns it. In particular it doesn't try to re-validate/re-load it in
any way.
Boris
More information about the odb-users
mailing list