java - JPA Join Column -
i have 3 tables in database. first one(categories) includes: id, category, isactive second one(menu) includes: parentid , childid. third one(items) includes: id, name , price. first table has relationship second. want relationship between second , third now. second table has these values in database: 7(id), book1(name), 120(price) 7(id), book2(name), 100(price) 8(id), car1(name), 1620(price) 8(id), car2(name), 520(price) 8(id), car3(name), 5520(price) 9(id), house1(name), 10000(price) 9(id), house2(name), 11000(price) 9(id), house3(name), 15000(price) at moment have joined column childid column id. menu.java @embeddedid menuid id; @column(name="parentid") private integer parentid; @column(name="childid") private integer childid; @onetoone @joincolumn(name="childid",referencedcolumnname="id") private categories subcategories; public categories getsubcategories() { return this.subcategories; } public void se...