I'd like to map my id to a column which is not unique. After having a look at the code of the load method of the EntityLoader.java I think Hibernate throws an exception if it detects, that there is more than one row returned for a query by id.
Is there a way to make Hibernate generating a select distinct, or just take the first row of the result set and ignore the others?
I do understand, that i could create a view, doing the distinct stuff, unfortunately, I'm not allowed to change the DB schema.
TIA
Ernst
Hibernate version:
2.1.6
Name and version of the database you are using:
Oracle 8/9, Sybase
|