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
Post a Comment