• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

spec's persistence question

 
Moayad Abu Jaber
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I read this rule in persistence spec's.

The behavior is unspecified if mapping annotations are applied to both persistent fields and
properties or if the XML descriptor specifies use of different access types within a class hierarchy.


that's mean we can't specified the annotation one for field, and the next one for property.

when we specified the annotation for field need to specified all unfading the annotation at fields.
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, You can use annotations either on fields or properties.

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic