Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

multiple @id annotations in a single entity

What is the difference between using multiple @Id in an entity Vs, Composite Id ?

Also, how does this @EmbeddedId work when there is no table actually created separately for the Embedded Object?

like image 669
BlueSky Avatar asked Nov 05 '22 21:11

BlueSky


1 Answers

Hibernate offers different options for defining/using composite identifiers. All these options are explained in depth in the hibernate reference manual: http://docs.jboss.org/hibernate/core/3.6/reference/en-US/html_single/#d0e4819.

like image 119
JB Nizet Avatar answered Nov 09 '22 14:11

JB Nizet