Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate mapping pojo/fields to different tables.  RSS feed

Rajkamal Pillai
Ranch Hand
Posts: 445
Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I need to map a POJO to different tables/columns. In my application I have a Search option where the search filters are fetched from different tables. For e.g there are drop downs on the search page with each containing primary keys of corresponding tables. The search option is performed on a different table with the selected values. Once a user selects any of the displayed rows I have to update another table in the database with the values. Can the same POJO be mapped to different tables. I dont need a JOIN or MANY-TO-MANY sort of mapping in this case.

For e.g


During the search I fetch values from the Make and Model table and display them in drop downs. If the user selects any of the result and clicks Update I have to update Table4 with the values. How do I go about this?
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!