Reputation: 4145
I have a class with it's own @Embeddable id class, let's call it ICompanyId. There are 2+ classes that implement ICompanyId. Classes that implement ICompanyId are the embedded id's for classes that implement ICompany (which there are 2+ implementing classes).
So, what I would like to do is this:
@EmbeddedId
public ICompanyId getId() { /* blah blah */ }
How do I tell Hibernate which implementing class to use? With a @ManyToOne or @OneToMany, all I would have to do is to specify a value in the targetEntity, but @EmbeddedId offers no such options. Can anyone help?
Jason
Upvotes: 2
Views: 196