[odb-users] polymorphic inheritance, typeid,
	odb::object_not_persistent
    Boris Kolpackov 
    boris at codesynthesis.com
       
    Tue Jul 21 11:15:31 EDT 2015
    
    
  
Hi,
MM <finjulhich at gmail.com> writes:
> I get this exception: odb::object_not_persistent
> 
> The intent is to load from the database all the persistent objects  (the
> derived) from the Base table, and assign them a concrete derived instance
> (D1...D10) according to the typeid, and populate the name field
> 
> I don't know if this is expected to work, and what is the correction if
> something is wrong.
Yes, the polymorpism part is expected to work, and from what you have
shown (i.e., no database mapping pragmas -- always a good idea to include),
I don't see anything wrong. Perhaps it is that 'cal' pointer that cannot
be loaded?
Boris
    
    
More information about the odb-users
mailing list