In my database I Have following structure :
ID NAME COUNT SOMETHING.. OWNER DATE
And now . I would like to select for each Owner record with max date.
Without GROUP BY clauzule my repository looks like :
@Repository
public interface MyRepo extends JpaRepository<MyEntity, Long> {
MyEntity findTopByOrderByDateDesc();
}
But with Group by it didiny works.
org.springframework.data.mapping.PropertyReferenceException: No property groupByOwner found for type
There is no grouping support for Spring Data yet, thus it won't work.
In case you want this, you have to write your own query.