0 Replies Latest reply on Jul 26, 2002 6:14 PM by jonathan-

    Identity values in database

    jonathan-

      Is it possible yet to use a database's automatic creation of identity values? When I set the <sql-type> to "int identity" I get the following error:

      16:56:13,468 ERROR [CoreRequestEJB] Could not create entity
      java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Cannot insert explicit value for identity column in table 'CoreRequestEJB' when IDENTITY_INSERT is set to OFF.

      I searched for previous posts and noticed that as of May this feature was not yet implemented in JBoss but was coming soon. There was a mention of using an MBean to get the latest value of the identity column so one would be able to create their own unique identity value. Does anyone have an example they could share?

      Thanks for your help,
      Jonathan