I've been trying to use a sql result set mapping to return entities with a composite key but to no avail; Hibernate is using names for the composite key columns that aren't found in the query, specified in the sql result set mapping or @Column annotations. I also tried @AttributeOverrides but those are ignored. The query uses some Oracle specific stuff so I need to use a native sql query.
When I rework the query and sql result mapping to use the column names Hibernate is looking for, I find the column names Hibernate is looking for aren't consistent. I run one set of unit tests and Hibernate is looking for columns "name3_0_" and "coordinate1_3_0_", if I run all the unit tests Hibernate is looking for columns "name3_0_" and "coordinate1_39_0_".
I've tried a couple of versions of Hibernate but its the same problem. Any ideas? Is this clearly not supported or just one of those weird corner cases?
|