I am new to hibernate. I want help/reference for the following situation
I have class A and its corresponding hbm.xml file. Individually it is working fine.
I have another class B and its corresponding hbm.xml file. Individually it is also working fine.
Please note that Class A and B are not related to each other in any way
I want to define class C like
public Class C{
private A a;
private B b;
getter and setter methods.
}
Now I want to define hbm.cfg.xml file for this. So that
session.save(objC) will save both A and B (containing classes) in one shot.
What type of mapping will be this?
Plz guide me. How to define mapping file.
Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
Hibernate3.0
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: