Hi,

So, is your problem solved ?
I really don't understand how you can make a database generated key without an unknown 
primary key. I don't know mySQL, just Oracle and MSSQL, and I have many projecs 
working with database generated keys using the unknown-pk.

Are you sure it is the database which generates the key, or Jboss itself ?
PS: Same problem with your Transaction bean.

Another thing: Your foreign key (in Transaction bean) is marqued as NOT NULL. I 
experiment myself that Jboss cannot delay the insert after ejbPostCreate when the 
database generates the key. This is a problem because CMR fields can only be set in 
ejbPostCreate. This problem is described in many forums.
So the solution is to create an additionnal CMP field for the foreign key, then you 
can set a value in ejbCreate (a good one of course), and then sets the CMR field in 
ejbPostCreate.



View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830133#3830133

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830133


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to