db-torque-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skka...@engr.uky.edu
Subject One to many relationship within a same object.
Date Mon, 19 Apr 2004 16:17:22 GMT
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


Mime
View raw message