Thank you very much for reply. -can you please explain about mapping them programatically? -How much effort it will need to map them programatically if we have access to mapping files for those table in runtime? -one more important thing, what will happen when we need to excute a query which include two type of objects?
Well, the Configuration and SessionFactory object can be modified programatically, there is an API.
"one more important thing, what will happen when we need to excute a query which include two type of objects?"
Can you query on two types of tables and union those queries together? It is kind of the same question. Do they have fields that relate to each other, same structure. If not, you will need two seperate queries. There is too many questions about what youa re doing to be able to completely ansewr your questions.
Joined: Jul 14, 2005
Thank you for the hint about Session Factory and configuration, another question is : how we can generate Java classes on the fly to map them with tables and add them to configuration object?