This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Object mapping at runtime

 
Rahul Gourshettiwar
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
1] Scenario-1

We have a scenario where we will get logical name of the tables from which we have to decide which table we have to refer to fetch data. So in this case i dont want to go with the option of creating as many POJO/Domain classes for all the tables in the databse. Is there any way where creation of POJO and maintaing the respective mapping in Hibernate.

2] Scenario-2

Say we have multiple tables but the column names differs with the prefixes like
Table1- Column Name - CKCState
Table2- Column Name - PMCState
So is there any way where we can maintain single POJO class but column mapping will done at runtime in hibernate.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic