Hi
Based on my search in the forum I gathered the following
- On the entity level you need to specify the following tag
@jboss.entity-command
* name="informix-serial"
* class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand"
in your case name = postgresql-fetch-seq and the class would be
org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand
an on you getId() method you need to specify the following tag
@jboss.persistance auto-increment ="true"
you can see the result of these two steps in your jbosscmp-jdbc.xml
on the entity you will get <enitiy-command ....> and on the field you will get
the <auto-increment/>
I did all of that for my entity and I mange to deploy it successfully BUT
whenevr I try to create an new enity.. I get the following exception
22:17:50,126 ERROR [MyEntity] Could not create entity
java.sql.SQLException: Primary key on table (mytable) has a field with a null
key value.
at com.informix.jdbc.IfxSqli.addException(IfxSqli.java:3082)
at com.informix.jdbc.IfxSqli.receiveError(IfxSqli.java:3396)
at com.informix.jdbc.IfxSqli.dispatchMsg(IfxSqli.java:2259)
at com.informix.jdbc.IfxSqli.receiveMessage(IfxSqli.java:2179)
at com.informix.jdbc.IfxSqli.executeCommand(IfxSqli.java:721)
at com.informix.jdbc.IfxResultSet.executeUpdate(IfxResultSet.java:305)
at
com.informix.jdbc.IfxStatement.executeUpdateImpl(IfxStatement.java:882)
>From the postings I feel that these two steps are enough (give it a try it
>might work for you)
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3869316#3869316
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3869316
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user