Hi there,
I have a class with a composite key mapped through @IdClass, where both foreign keys are declared through their interfaces. The interfaces have a default "*Impl" implementations and are also mapped through annotations. Now if I try to load the mappings, hibernate complains about an unknown type, since the foreign key is declared using an interface :(
Btw, the mappings are unidirectional.
Code:
@Entity
@Table(name="submission_result")
@IdClass(SubmissionResultPk.class)
public class SubmissionResultBean
implements SubmissionResult
{
@Id
private BaseArticle article;
@Id
private Magazine magazine;
...
}
@Embeddable
public class SubmissionResultPk
implements Serializable
{
private BaseArticle article;
private Magazine magazine;
// getters/setters
}
Now the question is, is there a way to tell hibernate, that article and magazine properties are already mapped in BaseArticleImpl and MagazineImpl classes (like it's done in @*To*(targetEntity=...) annotations)?
TIA,
jenner