java - ManyToOne column in embeddable class -


i have 2 entities embed (@embedded) adress embeddable. in adress class there property points entity location. in adress class put @manytoone , @joincolumn(...) annotations above it. error:

exception description: table [persons] not present in descriptor. descriptor: relationaldescriptor(com.wordpress.aiids.voeder.model.location --> [databasetable(locations)])

it's @joincolumn annotation causes trouble:

@manytoone //@joincolumn(name = "gemeente", referencedcolumnname = "gemeente", nullable = false) private gemeente gemeente; 

here's full code of embbedable class.

http://aiids.pastebin.com/g1sijnbl

do wrong putting annotations there or what's cause of error?

solution!

the solution referencedcolumnname must point primary key of entity gemeente "postcode" , not "gemeente".


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -