How to Map a table with another lookup table using JPA?
Posted
by Sameer Malhotra
on Stack Overflow
See other posts from Stack Overflow
or by Sameer Malhotra
Published on 2010-05-04T19:46:16Z
Indexed on
2010/05/04
21:28 UTC
Read the original article
Hit count: 208
Hi,
I have two tables:
1) Application(int appid, int statusid, String appname, String appcity with getter and Setter methods)
2) App_Status(int statusid,String statusDescription with setter and getter methods)
I want to map Application table with App_Status so that I don't have to query separately App_Status table in order to get the statusDescription. One thing I have to careful is that no matter what (Insert,update or delete) to the Application table the App_Status table should be unaffected means its a read only table which is maintained by the DBA internally and used only for lookup table.
I am using JPA annotations so please suggest how to handle this.
© Stack Overflow or respective owner