db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gabriel Bauman <g...@bravenet.com>
Subject Re: Mapping fields to subclasses in XML schema
Date Mon, 03 Mar 2003 17:32:08 GMT

> Since you want BAR in SubClass but not in SuperClass, define your schema 
> as below.
> <table name="superclass" javaName="SuperClass">
>   <column name="FOO" type="INTEGER" inheritance="single">
>     <inheritance key="SubClass" class="SubClass" extends="SuperClass" />
>   </column>
> </table>
> <table name="subclass" javaName="SubClass">
>   <column name="BAR" type="INTEGER" />
> </table>

See, this was what I would have thought, but since Torque's 
documentation says it stores superclasses and subclasses in the same 
table, I don't think what you're saying will actually work. The Torque 
Inheritance Guide (http://db.apache.org/torque/inheritance-guide.html) 
does not mention 'subclass' tables.

Can anyone else who uses inheritance in Torque please settle this? Is 
the above mthod actually correct?


View raw message