Hi all,

I'm using JBoss 4.0.0 with MySQL 4.0.18 and have a CMP entity bean which uses 
an Integer primary key. This is mapped onto an auto-incrementing bigint field 
in the database. In the Java code I have a create method that does not set the 
id (PK) field (as it is autogenerated) but when I call the create method I get 
the following:

 javax.ejb.CreateException: Primary key for created instance is null

The entry is added to the database OK but the container doesn't seem to 
understand the auto generated PK.

I'm obviously missing something here. Any help appreciated.

Best regards,

Ian

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

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


-------------------------------------------------------
This SF.Net email is sponsored by: New Crystal Reports XI.
Version 11 adds new functionality designed to reduce time involved in
creating, integrating, and deploying reporting solutions. Free runtime info,
new features, or free trial, at: http://www.businessobjects.com/devxi/728
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to