Skip to content
Advertisement

JpaRepository with custom Query and Composite Primary Key: error unknown column

I have a SQL Server entity with a Composite Primary Key.

That is the Entity:

JavaScript

and this is ID Class:

JavaScript

That is the JpaRepository

JavaScript

But when this Query is executed I get an error: Invalid Column name: plz

Advertisement

Answer

Finally I got the solution 🙂 The select wasn’t returing the full key / object. Validation on the object failed and there was not suitable constructor present.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement