This content has been marked as final.
Show 3 replies
-
1. Re: auto-increment problem
aloubyansky Nov 11, 2004 3:33 AM (in response to joerage)Yes, you should also use key generating entity-command. See standardjbosscmp-jdbc.xml.
-
2. Re: auto-increment problem
joerage Nov 11, 2004 1:50 PM (in response to joerage)Thanks for your answer.
I changed my standardjbosscmp-jdbc.xml as follows:<defaults> <datasource>java:/MSSQLDS</datasource> <!-- optional since 4.0 <datasource-mapping>Hypersonic SQL</datasource-mapping> --> <create-table>true</create-table> <remove-table>false</remove-table> <read-only>false</read-only> <read-time-out>300000</read-time-out> <row-locking>false</row-locking> <pk-constraint>true</pk-constraint> <fk-constraint>true</fk-constraint> <preferred-relation-mapping>foreign-key</preferred-relation-mapping> <read-ahead> <strategy>on-load</strategy> <page-size>1000</page-size> <eager-load-group>*</eager-load-group> </read-ahead> <list-cache-max>1000</list-cache-max> <clean-read-ahead-on-load>false</clean-read-ahead-on-load> <unknown-pk> <key-generator-factory>UUIDKeyGeneratorFactory</key-generator-factory> <unknown-pk-class>java.lang.Integer</unknown-pk-class> <jdbc-type>INTEGER</jdbc-type> <sql-type>INTEGER</sql-type> </unknown-pk> <entity-command name="mssql-fetch-key" class="org.jboss.ejb.plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand"/> <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</ql-compiler> </defaults>
I still get the same error.
Any ideas?
Or if somebody has working code, it would be very helpful.
Thanks
Joe -
3. Re: auto-increment problem
aloubyansky Nov 12, 2004 4:01 AM (in response to joerage)Not in standardjbosscmp-jdbc.xml but in jbosscmp-jdbc.xml in the entity element.