1 Reply Latest reply on Oct 15, 2006 11:44 AM by fastmhaavald

    Error with MS SQL 2005 and mapping of object with name User

    fastmhaavald

      I have an object annotated as shown below.
      Deploying in JBoss FAILS since it does not "see" the table name annotation.

      When hibernate tries to create the user table it fails with MS SQL 2005:



      @Entity
      @Table(name= "USERITEM")
      @Inheritance(strategy = InheritanceType.JOINED)
      public class User implements Serializable {

      ...

      }


      JBoss:

      20:16:42,809 ERROR [SchemaUpdate] Unsuccessful: create table User (ID numeric(19,0) identity not null, NAME varchar(255) not null unique, primary key (ID))
      20:16:42,809 ERROR [SchemaUpdate] Incorrect syntax near the keyword 'User'.


      Datasource in JBoss contains the following since I have not found any mapping spec for 2005 edition.

      <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -->

      <type-mapping>MS SQLSERVER2000</type-mapping>