Tom, I also did a little experiment to see the order in which each object is inserted by the store method. However the only one that appeared to be inserted was my report object which is the parent of scientist and IOS objects. I was hoping I could at least try putting the current scid value into the scid field of IOS. However IOS inserted but I had no relative idea when it was inserted due to the inability to get the "firing sequence" of the inserts. I don't like to work around the whole idea of ORM but since I cannot change our database I was hoping for a workaround.
Jim Wright [Contractor - SRA International] Web Developer Web Development Team Custom Applications Branch (CAB) Division of Enterprise and Custom Applications, CIT/NIH/DHHS 6707 Democracy Blvd, Suite 304 Bethesda, MD 20892 Office: 301. Email: [EMAIL PROTECTED] URL: http://webdev.cit.nih.gov/ -----Original Message----- From: Thomas Dudziak [mailto:[EMAIL PROTECTED] Sent: Friday, August 11, 2006 12:16 PM To: OJB Users List Subject: Re: Key in object not propulated from Foreign key listed in reference-descriptor On 8/11/06, Wright, Jim (NIH/CIT) [C] <[EMAIL PROTECTED]> wrote: > I have a field in a class called IOS that is not getting populated from > the foreign key definition in the scientist reference-descriptor shown > in IOS class-descriptor. My guess is that your problem stems from the fact that you use primary key fields for your foreign key fields which often leads to problems. In general you should not do that - if you change the reference to another object, then the identity of your object will change as well which is most certainly not what you want. Rather use seperate non-PK fields for the references. Or if the Report and Scientist classes link back to the IOS class (bi-directional link), then use collections instead in the IOS class. Tom --------------------------------------------------------------------- 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]