-
1. Re: autonumber table problem, it kept removed when server sh
liuqiang_home Oct 1, 2002 2:04 PM (in response to liuqiang_home)This is my mistake, forget this one.
-
2. Re: autonumber table problem, it kept removed when server sh
aloubyansky Oct 1, 2002 3:00 PM (in response to liuqiang_home)If you are with JBoss-3.X then drop jaws.xml.
What are trying to achieve?
What field is the primary key?
Is the field that is the primary key is a cmp field also?
You are going the wrong way. It won't work in this way. You should consider unknown primary key setup. Currently, for MSSQL you can use such constructs:
<!-- using sequence table -->
<unknown-pk>
<unknown-pk-class>java.lang.Integer</unknown-pk-class>
<column-name>genid</column-name>
<jdbc-type>INTEGER</jdbc-type>
<sql-type>INTEGER</sql-type>
</unknown-pk>
<entity-command name="pk-sql">
SELECT SEQ_2279_1.nextval FROM DUAL
</entity-command>
or
<!-- using UUIDKeyGenerator -->
<unknown-pk>
<unknown-pk-class>java.lang.String</unknown-pk-class>
<column-name>genid</column-name>
<jdbc-type>VARCHAR</jdbc-type>
<sql-type>VARCHAR(32)</sql-type>
</unknown-pk>
<entity-command name="key-generator"
class="org.jboss.ejb.plugins.cmp.jdbc.JDBCKeyGeneratorCreateCommand">
UUIDKeyGeneratorFactory
</entity-command>
This will work only with Branch_3_2 and HEAD.
Auto-increment is currently supported only for MySQL. You can help us to add support for MSSQL autonumber by providing 'CREATE TABLE' SQL statement that sets up a table with autonumber'ed field.
But I agree it's strange that the table is removed. I use MySQL and don't see it.