You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-user@db.apache.org by Bogdan Vatkov <bv...@globaltech-bg.com> on 2004/01/14 15:05:59 UTC
Self referenced table/class in torque ? (torque-gen issue)
Hi All,
I am experiencing a problem with a self referenced tables:
for a trivial relation
---------------------------------------------------------
table/class A
A.id
A.data
A.B_id (references to B.id)
---------------------------------------------------------
---------------------------------------------------------
table/class B
B.id
B.data
---------------------------------------------------------
torque will create method series (with different parameters):
A.getBs(); that returns List.
BUT if A and B are merged into 1 table/class:
---------------------------------------------------------
table/class C
C.id
C.data
C.C_id (parent_id) (references to C.id)
---------------------------------------------------------
torque engine will not generate method series:
C.getCs(); that return List
and it will create method
C.getC(); that returns C
Is that right? or i am missing something. Could this issue be solved wihtout changing the om tempaltes ?
With best regards,
Bogdan