This content has been marked as final. Show 2 replies
This question would be more suitable for the hibernate or ejb3 forums.
I've had a chat a few minutes ago and here's the answer:
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...