[odb-users] Problem with object loading view

Marcel Nehring mne at qosmotec.com
Thu Feb 11 09:26:36 EST 2016


Hi,

I am trying to load a persistent object from the database. This objects contains pointers to other persistent objects which again contain pointers to persistent objects and so forth. Somewhere down this tree there is an object for which I configured a callback using the callback pragma. When this callback fires in case of a post load event I try to load an object loading view. The type of object contained in this view is the same as the initial object I am trying to load. So what happens is that ODB eventually tries to load objects of my type from the database while it is already loading objects of the very same type from the database (maybe even the exactly same object).
This leads to the violation of an debug assertion. In the corresponding view_traits_impl::init() the statement is already locked when an instance of auto_lock is created, so that no lock is acquired. However, it is later tried to release the lock.

Is this a bug in ODB or am I not allowed to use ODB like this? Any suggestions on how a solution might look like?

Regards,
Marcel


More information about the odb-users mailing list