Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query in Persistence Specs about @Embedded

 
Satya P
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Persistence specs (chapter 2.1.6) say as follows:

------------------------------------
�If a persistent field or property other than a relationship property is not annotated with one of the mapping Annotations (or equivalent mapping information is not specified in the XML descriptor), the following default mapping rules are applied in order

If the type is a class that is annotated with the Embeddable annotation, it is mapped in the same way as if the field or property were annotated with the Embedded annotation.
----------------------------------------
Does this imply that @Embedded annotation is not mandatory.

Thanks in advance
Satya
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, it looks so. That's a good information. Although the books I'm reading do not mention anything about it, we have to trust the spec
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic