Closed
Description
Michal Ondrovic opened DATACMNS-1695 and commented
Simplified test case:
Projection interface:
public interface TestDto {
Long getId();
Boolean getTest();
}
Query with projection:
@Query(value = "select 1 id, true test", nativeQuery = true)
List<TestDto> test();
Boolean property "test" is not recognized as Boolean but as Byte. Calling getTest() throws this exception:
java.lang.IllegalArgumentException: Projection type must be an interface!
The projection is working if the boolean field is selected directly from a table, but not, when the field is "calculated".
More workarounds are possible, in my case change "Boolean getTest()" to "Byte getTest()" is the best
Affects: 2.2.6 (Moore SR6)