Hi All,
I'm working on some CMR EJB's and had a more general question on EJB architecture rather than specifically with Geronimo's implementation.
I have a pair of entity beans with a 1:M relationship. I'm attempting to set the parent object with a CMR,
setParentEntityLocal(ParentEntityLocal parent), on the many object during the creation of the many. I've tried to do this in the PostCreate and the Create.
Problem is the Foreign Key Column on the Child table has a NOT NULL constraint. How does one typically deal with this? Is it possible, or do I need to modify the DDL on the database? Can the FK column be defined as a CMP and set without messing up the CMR field?
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.
Thanks, as always:)
Mark Aufdencamp
BTW - I'm pretty close to migrating to Geronimo 2.0 (a couple of iterations). How does this same scenario work out with JPA?
