I've had a chat a few minutes ago and here's the answer:
(from 
http://www.hibernate.org/hib_docs/annotations/reference/en/html_single/#d0e161)

anonymous wrote : Depending on whether you annotate fields or methods, the 
access type used by Hibernate will be field or property. The EJB3 spec requires 
that you declare annotations on the element type that will be accessed, i.e. 
the getter method if you use property access, the field if you use field 
access. Mixing EJB3 annotations in both fields and methods should be avoided. 
Hibernate will guess the access type from the position of @Id or @EmbeddedId.

I've put @Id on the variable instead of the getters, and that was the reason 
the field was called instead of the method.

For future reference...

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4003211#4003211

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4003211
_______________________________________________
jboss-user mailing list
jboss-user@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to