Trying to access selected columns by renaming with alias with native query. for the same, i have implemented interface to collection them. But, getting Unknown entity: javax.persistence.Tuple; nested exception is org.hibernate.MappingException: Unknown entity: javax.persistence.Tuple
Code
public interface UserRepository extends JpaRepository<User,Integer>
{
@Query(value="SELECT t.id as user_id,t.name as user_name from {h-schema}user t WHERE t.pincode=:pincode", nativeQuery = true)
public Set<UserList> dataTrainerGuides(@Param("pincode") String pincode);
public static interface UserList
{
String getUser_id();
String getUser_name();
}
}