Ok.  Thanks!  I appreciate it!  That explains everything!
Tim

-----Original Message-----
From: Bruce Snyder [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 29, 2003 12:09 AM
To: [EMAIL PROTECTED]
Subject: Re: [castor-dev] Newbie: Relation Question

This one time, at band camp, Cobble, Tim said:

CT>I have been attempting JDO for a few days.  I have used Middlegen and
it
CT>generated a nice but unusable set of java JDO code.  Next, I found
CT>CastorOil on the 3rd party tools link.  My question is about the
CT>difference in the code.
CT>
CT>I have an Employee table (T_Employee).  One attribute of Employee is
CT>IPT.  This is a foreign key linked to T_IPT.id.  The Middlegen code
CT>treats this attribute as a Collection of T_IPT.  The CastorOil does
not.
CT>It is simply an attribute of type int.
CT>
CT>Which is "right"?  Is right in the eye of the beholder or is one
CT>implementation correct and the other incorrect?

Tim,

There is no right or wrong answer per se. It depends on the
relationships
between the classes (and therefore the tables). If this relationship is
a one-to-many or a many-to-many, then the Collection is correct. If this
relationship is a one-to-one, then the int is correct.

Bruce
-- 
perl -e 'print
unpack("u30","<0G)[EMAIL PROTECTED]&5R\"F9E<G)E=\$\!F<FEI+F-O;0\`\`");'

The Castor Project 
http://www.castor.org/

Apache Geronimo 
http://incubator.apache.org/projects/geronimo.html

----------------------------------------------------------- 
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

Reply via email to