To quote the first line of my previous post:
tenwit wrote:
If you want to map rows in the child table as entities then there must be a combination of columns that together make a unique row identifier.
You have stated that there is no such combination of columns that uniquely defines a row in this table. Therefore those rows cannot be mapped as entities. You can map them as elements in a collection, or you can change your DB schema.
Rows must have an id at the database level if they are to have an id in their mapping: common sense. Otherwise, how would you look up one specific row? The thing is, you don't need to look up one specific row. You only need to look up all rows that belong to a given parent. So you don't need a child.hbm.xml at all. Search through the ref docs for "<element" and "<composite-element" for examples of how to map the child table.