[odb-users] Inheritance

Boris Kolpackov boris at codesynthesis.com
Thu Aug 18 05:42:11 EDT 2011


Hi Jan,

Kuentzer, Jan <jan.kuentzer at roche.com> writes:

> I have a derived class (e.g. node_set) having a polymorphic variable with
> the type of the super class (e.g. node). This means the variable could
> actually be of the same type as the class itself (e.g. the node could
> be a node_set). If this is the case, the load method is not working.
> If the attribute is of another type everything is loaded perfectly
> fine. Is this a problem of the callback method since I load an object
> of the same type? If I load the attribute alone by id outside the
> callback method everything works fine.

I looked into this and apparently we had a bug there. Here is the
message for the fix I just committed:

"
Fix custom recursive load in post_load callback

Before we called the callback while holding the statements locked. As a
result, if the callback tried to load another object of this type, it
failed. Now we unlock the statements (since we have completely loaded
the object from ODB's point of view) and then call the callback. The
callback test has been updated to test this situation.
"

I can build you a pre-release snapshot of ODB with this fix if you
would like. Just let me know for which platform you need the ODB
binary, if any.

Boris



More information about the odb-users mailing list