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 sk...@engr.uky.edu on 2004/04/19 18:17:22 UTC

One to many relationship within a same object.

Hi,

  I have an entity that has a one-to-many (also, one too many :) ) relationship 
with itself. I'm actually trying to store a Tree in a database. I need a 
one-to-many relationship with itself so that a parent node can have many 
children. When I tried to use Node.getNodes() I realised that torque doesn't 
generate the function. Y is it so? It did generate the function for a 
one-to-many relationship between Node and another entity. I copied (from 
BaseNode.java) and pasted (to Node.java)the function call for the second 
relationship and changed the types where ever I needed to and it worked fine. 
What is the reason that Torque is not generating this function in the first 
place?? May be this should be done in the next version of Torque?

~Sarav

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-user-unsubscribe@db.apache.org
For additional commands, e-mail: torque-user-help@db.apache.org