0 Replies Latest reply on Jul 25, 2007 12:05 PM by icordoba

    BUG: is "id" a reserved field id in EJB3 entities?

    icordoba

      Hi there,
      I am migrating EJB2.1 Entity Beans to EJB3 and some of them have a field named "id" which is not primary key. When trying to add a Query JBoss/Hibernate seems to interchange the id field with the primary key field. This seems to be a Bug as naming "id" with, for example "userid" makes everything work smooth. If not I get:
      Caused by: org.hibernate.TypeMismatchException: named parameter [2] not of expected type; expected = class java.lang.Integer; but was =java.lang.String

      (Primary key field is an Integer while id field is a String)

      Any info on this?
      thanks,
      Ignacio