This content has been marked as final.
Show 3 replies
-
1. Re: Generating auto incrementing filed ...
milowe Dec 20, 2004 10:51 AM (in response to hubaghdadi)If it is a key you will have to add something like this to your jbosscmp-jdbc.xml file.
<unknown-pk>
<unknown-pk-class>javaClass</unknown-pk-class>
<auto-increment/>
</unknown-pk>
<entity-command name="mysql-get-generated-keys" class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand">
</entity-command>
For non key fields, adding <auto-increment/> to your <cmp-field> in jbosscmp-jdbc.xml should do it. -
2. Re: Generating auto incrementing filed ...
redbeard15 Dec 20, 2004 11:27 AM (in response to hubaghdadi)Look at the following topic:
http://www.jboss.org/index.html?module=bb&op=viewtopic&t=56955
Hope this helps. Let me know if it doesn't.
RB -
3. Re: Generating auto incrementing filed ...
ppetrou Dec 22, 2004 10:39 PM (in response to hubaghdadi)Hi,
I used this posting and auto-increment with mysql seemed to work
fine even without an unknown-pk element.
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3832108
Hope that helps
Petros