[odb-users] Query Language and Polymorphic Types

Boris Kolpackov boris at codesynthesis.com
Mon Mar 13 08:29:35 EDT 2023


Brian E. Coggins <becoggins at hotmail.com> writes:

> Now imagine I’m querying for owner instances where I already know
> that owned is of type derived and I’d like to include derived.data
> as a query field.  Does ODB’s query language offer any kind of trick
> for including the derived member in the query?

I think your best bet is to try to express this assumption (i.e., that
the pointer to the base object is actually always the derived object)
as an object loading view:

https://www.codesynthesis.com/products/odb/doc/manual.xhtml#10.2



More information about the odb-users mailing list