From: David L. <dle...@co...> - 2009-07-18 18:37:30
|
On 18-Jul-09, at 2:25 PM, Ricardo J. Parada wrote: > Hi All, > > The _WonderEntity.java generates two methods for setting a > relationship (foo). So what is the difference between these two: > > myEO.setFoo(aFoo); > > and > > myEO.setFooRelationship(aFoo); Did you look at setFooRelationship? The important bits are: if (value == null) { com.blah.Foo oldValue = foo(); if (oldValue != null) { removeObjectFromBothSidesOfRelationshipWithKey(oldValue, "foo"); } } else { addObjectToBothSidesOfRelationshipWithKey(value, "foo"); } ;david -- David LeBer Codeferous Software 'co-def-er-ous' adj. Literally 'code-bearing' site: http://codeferous.com blog: http://davidleber.net profile: http://www.linkedin.com/in/davidleber twitter: http://twitter.com/rebeld -- Toronto Area Cocoa / WebObjects developers group: http://tacow.org |