I have entity called Entity1 which have composite primary keys id1 and id2. In here I used primary key class called Entity1Id.
And I have Other entity called Entity2 which also have 2 primary keys. And in that Entity2 one primary key should be Entity1's instance(as a foreign key).
My problem is how I make Entity2 - with making Entity1's foreign key as it's composite primary key member?
posted 6 years ago
You can use @Id on a OneToOne or ManyToOne relationship to cascade an id.