0 Replies Latest reply on Sep 11, 2006 6:37 AM by ponobhayedo

    MS Sqlserver Identity not set for autogenerated column with

    ponobhayedo Newbie

      I used the following tags in my CMP entity class to generate jbosscmp deployment descriptor file.

      @jboss.unknown-pk
      * auto-increment = "true"
      * column-name = "ID"
      * filed-name="id"
      * class = "java.lang.Integer"
      * jdbc-type = "INTEGER"
      * sql-type = "INTEGER"

      It seems to generate fine and when deployed also generates the required table. However, the primary key which is suppose to have the identity attribute is not set to yes. Hence my code breaks down because NULL value is being inserted into the ID column by the code since it expects it to be an IDENTITY column.

      Any help on how to get jboss to generate the original table with IDENTITY set to yes on MS SQLServer is highly appreciated.