spring boot 2.7.2
In these two cases I use the following expression: PageRequest.of(0, 10, JpaSort.unsafe("LENGTH(name)")) and my model has name property.
For exmaple if I using default method findAll(Specifiocation, Pageable), then I will get exception:
org.springframework.data.mapping.PropertyReferenceException: No property 'unsafe expression' found for type 'Entity'
But if I using method with @Query annotation then I will get success query.