Hibernate version:
2.1.6
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:
I have 2 class, a parent and a child. The child maintains a reference to the parent, and the parent has a set of children. My question is, is there a way to define the one-to-many without referencing the column in the key definition?
It seems like there should be a way to say that the key is based on the childs property rather than on a column name.
The reason is that I cant really have column names in the mapping files as colum names are controled via whatever NamingStragey is configured by the end user.
Also is there a way to define the mappings such that the relation ship is maintained by the parents collection, but the child define a hibernate populated property for parent ?
|