In 3.5.1 and later versions, the following repository method fails:
@Query("select de.field from DemoEntity de where de.id=:id")
Set<DemoField> getDemoFields(@Param("id") Long id);
DemoField is a record type. The method fails with:
org.springframework.dao.InvalidDataAccessApiUsageException: org.hibernate.query.SemanticException: Missing constructor for type 'DemoField' [select new com.example.demo.DemoField(de.field) from DemoEntity de where de.id = :id]
This works in 3.5.0 and earlier.
Demo project: https://github.com/ucmjswink/SpringDataJpaRecordMissingConstructor