geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Aufdencamp <m...@aufdencamp.com>
Subject EJB 2.1 CMR Question
Date Fri, 31 Aug 2007 16:14:31 GMT
<html><body><div>Hi All,</div>
<div>&nbsp;</div>
<div>I'm working on some CMR EJB's and had a more general question on EJB architecture&nbsp;rather
than specifically with Geronimo's implementation.</div>
<div>&nbsp;</div>
<div>I have a pair of entity beans with a 1:M relationship.&nbsp; I'm attempting
to set the parent object with a CMR, </div>
<div>setParentEntityLocal(ParentEntityLocal parent),&nbsp;on the many object during
the creation of the many.&nbsp; I've tried to do this in the PostCreate and the Create.</div>
<div>&nbsp;</div>
<div>Problem is the Foreign Key Column on the Child table has a NOT NULL constraint.&nbsp;
How does one typically deal with this?&nbsp;&nbsp; Is it possible, or do I need to
modify the DDL on the database?&nbsp; Can the FK column be defined as a CMP and set without
messing up the CMR field?</div>
<div>&nbsp;</div>
<div>I have the freedom to change the DDL, but was a bit curious how one would deal
with this if they were working in a more structured environment where the DBA might not be
so willing to change th DDL.</div>
<div>&nbsp;</div>
<div>Thanks, as always:)</div>
<div>&nbsp;</div>
<div>Mark Aufdencamp</div>
<div><A href="mailto:Mark@Aufdencamp.com">Mark@Aufdencamp.com</A></div>
<div>&nbsp;</div>
<div>BTW - I'm pretty close to migrating to Geronimo 2.0 (a couple of iterations).&nbsp;
How does this same scenario work out with JPA?</div>
<div>&nbsp;</div>
<div>&nbsp;</div></body></html>

Mime
View raw message