Hello. I'm trying to figure out how to represent an object hierarchy in my
turbine app using torque. The core need is to have each item in the system
generate its own unique id. I'd like there to be a base 'object' table that
uses idbroker to generate auto-incremented ids. Creating an object of a
specific type (a teacher, class, or student, for example) must insert a row
into object and generate a unique id, and then create a row in the
appropriate corresponding subclass table (teacher, class, or student). Of
course, I could do this myself by first creating an 'object' object, then
use its id to initialize a subtype, but from the torque site it looks like
what I want to do is built in. However, the docs/example has me confused.
Below is a simple beginning of the table structure. Where should the
<inheritance> tags go? And what does the 'key' property do?
<table name="object" idMethod="idbroker">
<column name="OBJECT_ID" required="true" primaryKey="true"
type="INTEGER"/>
</table>
<table name="student">
<column name=OBJECT_ID" required="true" primaryKey="true"
type="INTEGER"/>
<column name="NAME" size="255" type="VARCHAR"/>
</table>
<table name="class">
<column name=OBJECT_ID" required="true" primaryKey="true"
type="INTEGER"/>\
<column name="NAME" size="255" type="VARCHAR"/>
</table>
<table name="teacher">
<column name=OBJECT_ID" required="true" primaryKey="true"
type="INTEGER"/>
<column name="NAME" size="255" type="VARCHAR"/>
</table>
Thanks!
-d
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>