This content has been marked as final.
Show 4 replies
-
1. Re: What's wrong with the following OR mapping?
yantriki Feb 23, 2006 11:17 AM (in response to yantriki)just want to point out that I have a variable of ModuleType defined in the Module class.
-
2. Re: What's wrong with the following OR mapping?
yantriki Feb 23, 2006 2:21 PM (in response to yantriki)ok I fixed it by moving the @OneToMany annotation over the field rather than the getter method.
-
3. Re: What's wrong with the following OR mapping?
bill.burke Feb 23, 2006 4:15 PM (in response to yantriki)You cannot mix and match your mapping declarations between field and getter methods.
You placed the @Id on a field, so the mapper is expecting that all your mapping information is placed on fields -
4. Re: What's wrong with the following OR mapping?
yantriki Feb 24, 2006 9:34 AM (in response to yantriki)Bill,
Thanks for the clarification.
Regards
Vivek
EJB Persistence spec section 2.1.1
When annotations are used, the placement of the mapping annotations on either the persistent fields or persistent properties of the entity class specifies the access type as being either field- or property-based access respectively.