0

I am trying to use a @SqlResultSetMapping to map a native-query-result into an Entity. This entity happens to have a lazy loaded @OneToMany with a referencedColumnName that does not point to a PK. That @OneToMany is not relevant to my native query.

The problem is is when i execute the native query, i get:

The column name mycolumn18_20_0_ was not found in this ResultSet.

But if i remove the referencedColumnName from the @OneToMany, then it works.

This forces me to add a mycolumn18_20_0_ to my native select.

How am i supposed to handle this situation? How do i map this mycolumn18_20_0_ in my @SqlResultSetMapping.

M364M4N cro
  • 680
  • 2
  • 10
  • 23

0 Answers0