> I got a problem for mapping following object structure to database with > Castor. The database design is customizable to fit castor if needed. > > The object structure is > > User inherits Principal > Role inherits Principal > > Capability has a property "principal" which may be a User or a Role. > > Is it possible to have such relationship with Castor? If so, how to let > Castor to determine whether load a User or a Role when it loads a > Capability? > > > Proposed Data Structure is > > create table principal_t ( > id integer > ); > > create table user_t ( > id integer > constraint user_t_id_fk > references principal_t(id), > name varchar2(50) > ); > > create table role_t ( > id integer > constraint user_t_id_fk > references principal_t(id), > name varchar2(50) > ); >
<<attachment: winmail.dat>>
