• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Embeddable Class

 
Tony romer
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys,
Is class with @Embeddable annotation on the top can be considered as Entity class?

Thanks
 
Deepika Joshi
Ranch Hand
Posts: 268
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think, NO.

@Embeddable is used for two cases,
-@EmbeddedId
-@Embeded

Embeddable can not have PK (because nested embedding is not allowed), so it can not be an Entity (Entity must have PK).

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