简体   繁体   中英

JPA Hibernate Composite Id

I need to retrieve data from two tables. Tab1 and Tab2.

Tab1 has these columns :- tabId(Foreign key with Tab2.tabId)(Primary Key), tabType(Primary Key), tabAdd(Primary Key), tabUser

Tab2 has these columns :- tabId(Primary Key), location, name, description.

Really appreciate quick help!!

Maybe you should edit the post and show us DB diagram because your description isn't clear. I think if we should have more data :) you have 3 PK on tab1? Which relationship is between them? Greetings :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM