T
Tim
I'm working on a CMP 2 entity bean and MS SQL Server 2000 and JBoss
3.2.1/Tomcat 4.1.24.
My primary key is an integer, auto-incremented by the database.
I can't seem to get XDoclet v1.2b3 to generate the necessary items in
jbosscmp-jdbc.xml to allow me to create a new record and have the database
generate the key value. I am not trying to create it with an explicit
value. It looks like the @jboss.unknown-pk is being completely ignored when
generating the descriptor.
Here's the JDBC error:
"Cannot insert explicit value for identity column in table 'my_table' when
IDENTITY_INSERT is set to OFF."
Here are some XDoclet tags from my class-level comment:
* @ejb.persistence table-name="gs_person"
*
* @jboss.persistence datasource="java:/MsSql2"
* datasource-mapping="MS SQLSERVER2000"
* table-name="my_table"
* @jboss.unknown-pk class="java.lang.Integer"
* column-name="my_id"
* jdbc-type="INTEGER"
* sql-type="int"
* auto-increment="true"
* @jboss.entity-command name="mssql-get-generated-keys"
The entity-command exists in standardjbosscmp-jdbc.xml in my JBoss default
conf dir.
Any help is appreciated,
Tim
3.2.1/Tomcat 4.1.24.
My primary key is an integer, auto-incremented by the database.
I can't seem to get XDoclet v1.2b3 to generate the necessary items in
jbosscmp-jdbc.xml to allow me to create a new record and have the database
generate the key value. I am not trying to create it with an explicit
value. It looks like the @jboss.unknown-pk is being completely ignored when
generating the descriptor.
Here's the JDBC error:
"Cannot insert explicit value for identity column in table 'my_table' when
IDENTITY_INSERT is set to OFF."
Here are some XDoclet tags from my class-level comment:
* @ejb.persistence table-name="gs_person"
*
* @jboss.persistence datasource="java:/MsSql2"
* datasource-mapping="MS SQLSERVER2000"
* table-name="my_table"
* @jboss.unknown-pk class="java.lang.Integer"
* column-name="my_id"
* jdbc-type="INTEGER"
* sql-type="int"
* auto-increment="true"
* @jboss.entity-command name="mssql-get-generated-keys"
The entity-command exists in standardjbosscmp-jdbc.xml in my JBoss default
conf dir.
Any help is appreciated,
Tim