java - multiple columns with two foreign key column in Hibernate -
i have 3 tables:
1.
@table(name = "vrtl_pi_boi_dlvr") vrtlpiboidlvr private list<vrtlpiboidlvractions> vrtlpiboidlvractions; @onetomany(mappedby = "vrtlpiboidlvr", fetch = fetchtype.eager,cascade = cascadetype.all) @fetch(value = fetchmode.subselect) @cache(region = "business", usage = cacheconcurrencystrategy.read_write) public list<vrtlpiboidlvractions> getvrtlpiboidlvractions() { return vrtlpiboidlvractions; } public void setvrtlpiboidlvractions( list<vrtlpiboidlvractions> vrtlpiboidlvractions) { this.vrtlpiboidlvractions = vrtlpiboidlvractions; }
2.
@table(name = "vrtl_pi_boi_dlvr_actions") vrtlpiboidlvractions private list<vrtlpiboidlvrifn> vrtlpiboidlvrifn; private vrtlpiboidlvr vrtlpiboidlvr; @onetomany(mappedby = "vrtlpiboidlvractions", fetch = fetchtype.eager,cascade = cascadetype.all) @fetch(value = fetchmode.subselect) @cache(region = "business", usage = cacheconcurrencystrategy.read_write) public list<vrtlpiboidlvrifn> getvrtlpiboidlvrifn() { return vrtlpiboidlvrifn; } public void setvrtlpiboidlvrifn(list<vrtlpiboidlvrifn> vrtlpiboidlvrifn) { this.vrtlpiboidlvrifn = vrtlpiboidlvrifn; } @manytoone @joincolumn(name = "boi_dlvr_id", referencedcolumnname = "boi_dlvr_id", nullable = false) @fetch(value = fetchmode.select) public vrtlpiboidlvr getvrtlpiboidlvr() { return vrtlpiboidlvr; } public void setvrtlpiboidlvr(vrtlpiboidlvr vrtlpiboidlvr) { this.vrtlpiboidlvr = vrtlpiboidlvr; }
3.
@table(name = "vrtl_pi_boi_dlvr_ifn") vrtlpiboidlvrifn private vrtlpiboidlvractions vrtlpiboidlvractions; @manytoone @joincolumns({@joincolumn(name = "action_id", referencedcolumnname = "action_id", nullable = false), @joincolumn(name = "boi_dlvr_id", referencedcolumnname = "boi_dlvr_id", nullable = false)}) @fetch(value = fetchmode.select) public vrtlpiboidlvractions getvrtlpiboidlvractions(){ return vrtlpiboidlvractions; }
the exception :
caused by: org.hibernate.mappingexception: unable find column logical name boi_dlvr_id in table vrtl_pi_boi_dlvr_actions
what have change fix this?
Comments
Post a Comment