• 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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!