When do you write explicit primary key class in CMP?

Showing Answers 1 - 1 of 1 Answers

xortha

  • Mar 28th, 2007
 

when ejb server doesn't provide db specific method to provide primary key, e.g. for jboss - if you don't specify appropriate entries in jbosscmp-jdbc.xml's (<auto-increment/> for <cmp-field> for primary key and (let's assume that's mysql) <entity-command name="mysql-get-generated-keys"/>). Then you must set primary key in your Entity on your own.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions