[jboss-user] [EJB 3.0] - BUG: is "id" a reserved field id in EJB3 entities?
icordoba
do-not-reply at jboss.com
Wed Jul 25 12:05:41 EDT 2007
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
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4067477#4067477
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4067477
More information about the jboss-user
mailing list