If i want severeal Column to make up an ID.
SQL example :
CONSTRAINT [PK_NAME] PRIMARY KEY ([Column1],[Column2],[Column3])
How can
If all fields in the class are part of primary key, then solution would be pretty simple (extending solution provided by @raul-cuth):
@Entity
@IdClass(EntityExample.class)
public class EntityExample implements Serializable {
@Id
private int column1;
@Id
private int column2;
@Id
private int column3;
}