From: Jonathan.O'<Co...@xc...> - 2003-03-24 16:44:53
|
Alex, Presumably, in ejbCreate() I have to call setFkAsCmpField(fkObj.getKey()), and then I don't need to call setFkAsCmrField( fkObj ) in ejbPostCreate(). Ciao, Jonathan O'Connor Development Manager XCOM Dublin Phone: +353 1 872 3305 Mobile: +353 86 824 0736 Alex Loubyansky <lou...@ua...> Sent by: jbo...@li... 24.03.2003 15:52 Please respond to jboss-user To: Simone Milani <jbo...@li...> cc: Subject: Re[4]: [JBoss-user] CMR with FK in the database Hello Simone, actually, it looks like exposing FK field[s] as non-null CMP field[s]. Just map FK fields to CMP fields in jbosscmp-jdbc.xml. NOTE: there is currently a bug (stack overflow on loading) in FK fields map to CMP columns. I can't commit changes to CVS the whole day. I hope Dain will help help me and today it'll be fixed in CVS. alex Monday, March 24, 2003, 3:45:54 PM, Simone Milani wrote: SM> Hi Alex, SM> Thanks! Do I have to expose the FK field in my ChildBean? Could you SM> provide an example? SM> Thanks!!!! SM> Simone SM> ----- Original Message ----- SM> From: "Alex Loubyansky" <lou...@ua...> SM> To: "Jonathan.O'Co...@xc..." <jbo...@li...> SM> Sent: Monday, March 24, 2003 12:06 PM SM> Subject: Re[2]: [JBoss-user] CMR with FK in the database >> JBoss-3.2 now supports NON-NULL foreig keys if foreign key fields are >> mapped to NON NULL CMP fields. >> >> alex >> >> Monday, March 24, 2003, 1:50:17 PM, Jonathan O'Connor wrote: >> >> JOCxd> Simone, >> JOCxd> Look for previous messages about INSERT after ejbPostCreate. >> JOCxd> If you use oracle you can also mark the NON NULL constraint as SM> DEFERRABLE >> JOCxd> INITIALLY DEFERRED. However, lots of DBAs don't like this. >> JOCxd> Ciao, >> JOCxd> Jonathan O'Connor >> >> >> >> >> >> JOCxd> "Simone Milani" <mi...@ho...> >> JOCxd> Sent by: jbo...@li... >> JOCxd> 24.03.2003 10:43 >> JOCxd> Please respond to jboss-user >> >> >> JOCxd> To: <jbo...@li...> >> JOCxd> cc: >> JOCxd> Subject: [JBoss-user] CMR with FK in the database >> >> >> JOCxd> Hi, >> >> JOCxd> I have a one to many relation with a FK constaint and the FK in SM> the >> JOCxd> children declared as non nullable. The SQL that is generated by SM> JBoss >> JOCxd> seems to violate this constraint. >> >> JOCxd> Please help!!! >> >> >> JOCxd> Thanks >> >> JOCxd> Simone ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf _______________________________________________ JBoss-user mailing list JBo...@li... https://lists.sourceforge.net/lists/listinfo/jboss-user |