Hi, everyone. I am new to hibernate, so my question may be stupid.
Anyway, I am on a project which using hibernate, and I need to do some kinda column mapping.
Here is an example, let's say I have 2 tables T1, and T2, each of which has 3 columns, all named x1, x2, x3. Then I have a java class JClass with 2 private variables: id and value. I want to map JClass to both T1 and T2.
When I ask hibernate to return a row of T1, a collection of JClass instantces will be returned. Each instance's id is column name and value is the value of that column for a specific row.
Can hibernate do that? If it can, would someone give me the mapping xml file based on above example?
Thank you very much and have a nice day.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Mapping documents:
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
Name and version of the database you are using:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt: