Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Composite key class relationship → ERROR: not mapped to a single property

Cleber Farinazzo Junior
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
CVariacaoTO class has a composite key (FK_T, FK_F, FK_F_VARIACAO). (FK_F, FK_F_VARIACAO) are also foreign key to FVariacaoTO table, in a ManyToOne relationship.

FVariacaoTO class has two primary keys, into a @Embeddable class FVariacaoPK.

This ERROR has ocurred: referencedColumnNames(FK_F, ID) of CVariacaoTO.fVariacaoTO not mapped to a single property

Relationship is just described in CVariacaoTO class. I don't know if a need write something about relationship in FVariacaoTO class, making @OneToMany or something like that.

What usually done this error?
How usually is done this kind of relationship?
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!