The Position table is just a reference table, it is basically a read only table. It is reference by Employee Table with PositionID. In most cases, I just want to update PositionID, not Position. It is like sex attribute (male/female).
What is the best approach using Castor? -----Original Message----- From: Julian L�ffelhardt [mailto:[EMAIL PROTECTED]] Sent: Tuesday, January 08, 2002 2:09 AM To: [EMAIL PROTECTED] Subject: Re: [castor-dev] unable to call update Hi, The best way I found to avoid these (and many other) problems is: Each Object implements the interface Persistent. The callback function jdoUpdate is used to call update() on all related objects if they aren't persistent yet. This way I avoid cluttering my business logic with 1-10 update() calls every time I want to update asn object. What do you think about this solution? julian L�ffelhardt ----- Original Message ----- From: "Bruce Snyder" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, January 07, 2002 6:34 PM Subject: Re: [castor-dev] unable to call update > This one time, at band camp, Christopher Cheng said: > > CC >[christopher] Castor: Loading com.netdimen.pms.employee.Employee (1) > CC >org.exolab.castor.jdo.PersistenceException: Object, > CC >com.netdimen.pms.employee.Em > CC >ployee@7d03c5, links to another object, > CC >com.netdimen.pms.employee.Position@2a13a > CC > that is not loaded/updated/created in this transaction > CC > > CC > <field name="position" type="com.netdimen.pms.employee.Position"> > CC > <sql name="positionID"/> > > Christopher, > > Becasue of the mapping above for a field of type Position within > the Employee object, the field called position must be loaded. > Because Position does not depend on Employee, it will need to loaded > manually perhaps through the use of a getter. > > Bruce > -- > > perl -e 'print unpack("u30","<0G)U8V4\@4VYY9&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");' > > ----------------------------------------------------------- > If you wish to unsubscribe from this mailing, send mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > > ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
