Granted, and I will pursue this as a possibility, hopefully we can make our design work using the parent-child assoc. only. But is there no way to control the order? I assume that the answer is no from your response. I guess I'll have to look into how OJB decides to satisfy my curiosity. Thanks for the quick response,
hba -----Original Message----- From: Thomas Mahler [mailto:[EMAIL PROTECTED] Sent: Friday, August 01, 2003 5:13 AM To: OJB Users List Subject: Re: 1:1 mapping Hi Hal, I think the problem is the bidirectional association. If you would simply use an unidirectional association OJB will evaluate this association and insert Objects in the correct order. If there is a birectional association specified OJB does not know which side is the master that must be inserted first! cheers, Thomas hal arnold wrote: > Folks, > > We have a simple parent-child relationship mapping > with navigability in both directions (parent has > association for child and vice-versa), with fk > references in both repository descriptors pointing to > the other. Everything seemed to be working (as far as > autoupdate) except that today, we turned on a > constraint (Oracle) that says the parent must exist > when the child is created. It immediately broke the > unit tests, giving a 'constraint violation', implying > that the parent was not in existence when the child > was trying to be created. Sure enuf, looking at the > emitted sql (p6spy) seems to show that the child gets > created first. Again, we are simply trying create a > parent-child relationship, by building the object tree > and then storing the parent. > > Is there anyway to force which creation occurs first? > One would think that it would be natural to think that > the parent would be created first, or at least that > you guys would have provided for this constraint; it > seems so natural. > > thanks in advance, > > hba > > __________________________________ > Do you Yahoo!? > Yahoo! SiteBuilder - Free, easy-to-use web site design software > http://sitebuilder.yahoo.com > > --------------------------------------------------------------------- > 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
