[odb-users] access cached instances of a certain type?

Christian Sell christian at gsvitec.com
Thu Sep 24 10:26:08 EDT 2015


Hello,
 
for reason of not breaking existing API  I cannot hand out shared_ptrs to my
(lightweight) mapped objects. I therefore need to determine the persistence
state explicitly. Here's the sequence
 
vector<MyClass> v = persistenceManager.getMyClasses();
 
//change objects in v, add new ones
 
persistenceManager.saveMyClasses(v);
 
in order to detect newly added objects, I would like to ask the object cache
(rather than maintaining my own). I think would need a way to get all cached
MyClass objects and check by id whether the passed-in objects match or not... I
did not find such API on odb::session, so I thought I'd ask
 
thanks,
Christian



More information about the odb-users mailing list