[jboss-user] [JBoss Seam] - Re: Straightforward ejb3 mapping problem
do-not-reply at jboss.com
Thu Jan 18 05:20:36 EST 2007
I've had a chat a few minutes ago and here's the answer:
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
More information about the jboss-user