Currently in JBoss, you have to have your cmr foreign keys nullable since they can only be set in ejbPostCreate(). From what I understand, Dain Sundstrom ("the" JBossCMP guy) is very aware of this and is looking at supporting setting cmrs in ejbCreate() (so you can have NOT NULL foreign keys) in a not-to-distant future version. Dain, please correct me if I'm wrong.
David -- Peter Shillan wrote: > Hi Folks, > > I've recently been implementing Brett McLaughlin's "Building Java > Enterprise Architecture" examples on JBoss 3.0.3 and I'm having great > (if frustrating!) fun doing it :-D. I have a problem regarding CMR > fields though ... > > - CMR fields must be assigned in ejbPostCreate() > - It makes sense to have a table's foreign key NOT NULL > > But is this possible? I mean, JBoss wants to run a SQL INSERT after > ejbCreate() but it can't because of the foreign key constraints. I can > take the NOT NULL off, but this doesn't seem like a satisfactory > solution. > > Is there a way of doing this? > > Many thanks > > --peter ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user