Closed
Description
We would like to allow subclasses to e.g. represent a ReturnedType
that is a class outside of the entity hierarchy but not a projection. This can happen in queries that select nested properties:
@Query("select u.address from User u where u.emailAddress = ?1")
Optional<Address> findAddressByAnnotatedQuery(String emailAddress);
@Query("select u.address.city from User u where u.emailAddress = ?1")
String findCityByAnnotatedQuery(String emailAddress);