Hi all, I have a problem using torque for a table that has a foreign key to itself (in order to implement tree structures). This table in question has an integer primary key. I'm using oracle 8 as DBMS.
Insertion of a new record at the top level of a tree (with a null value for the FK field), will throw an sql exception when using the standard .save() method of the torque table class. In the archives I found somebody posted a workaround to this problem by using the doInsert() method of the object's peer class, using a Criteria object with the null inserted as FK. Another thing I did was overloading the table class' save() method, to check for a null value fk, and if so, use the workaround, otherwise use the enherited save() method from the baseclass. I was wondering if there is a more elegant solution to this problem? Kind regards, Nicolas --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
