posted 8 years ago
I want to achieve the following operation using openJPA. I have two entities. USER and CITIES. I have a table USER with columns USER_NAME and CITY_DESC. I also have a table CITIES which contains columns PIN_CODE and CITY_DESC.
On the UI I get only PIN_CODE data from user. I need to save USER table making a join with CITIES table. I want CITY_DESC populated when I save USER entity using EntityManager.merge() method.
Something like this:
OpenJPA version : 2.2.2
Kindly help.