hello I tried to use torque onDelete attribute on MSSQL but it did't wokred db was throwing an exception about constraint violation maybe I did something wrong
> As a matter of curiosity: what kind of Java code would you want to generate? first of all that generates java code, which is generated depending on onDelete attribute, which deletes (or sets null) all associated objects in collection maybe it sounds simple and going into details prove that it is difficult and I will not be able to do that but the biggest problem I consider to solve is the lack of such functionality: when I operate on object and its assoctated collection I'd like to be able to "tell" the object to delete one of associated objects and when I call save it will automaticly delete associated objects I makred as "to delete" I also found that this code does'nt work: Company company = new Company(); Address address = new Address(); company.setAddress(address); company.save(conn); // I'd like that this saves also address but it does not //but the most important thing is that when I call: address.save(conn); //an exception will be thrown - before the above line I shoul do: company.setAddress(address); or address.setCompany(company); generaly speaking I miss functionality which cares about accosiated objects (adding/setting/deleting) please correct me if I'm wrong - I'm no torque guru - maybe I mixed up soething :) cheers Artur ----- Original Message ----- From: "T E Schmitz" <[EMAIL PROTECTED]> To: "Apache Torque Users List" <[EMAIL PROTECTED]> Sent: Thursday, July 29, 2004 11:27 AM Subject: Re: 1. onDelete 2. 1:n association > Hello, > > I forgot to mention: > > T E Schmitz wrote: > > > b) I am using the LEFT/RIGHT/INNER Join patch by Thomas Fischer-- > > The use of OUTER JOINs required a change to row2Object(...). Previously, > it was not possible for the FK object to be null. But with OUTER JOINs > that has to be taken into consideration. Therefore row2Object() needs to > return null now if all of the FK table's attributes are null. Of course, > this will not work if using primitive types! You must set > defaultJavaType="object" to use OUTER JOINs. As I use object types > myself I didn't bother to cater for primitive types in row2Object(...). > > As you can see, doSelectJoinAll (...) is basically a copy of > doSelectJoinExceptXXX (...). I replaced the double loop by HashMap's, > which tracks the FK objects already read. > > > Regards/Gru�, > > Tarlika Elisabeth Schmitz > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
