Win a 3 month subscription to Marco Behler Videos this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Hibernate /JPA and Spring Data statistics join 2 tables. Result from talbe 1 daily values  RSS feed

 
Sergej Smoljanov
Ranch Hand
Posts: 472
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to get result as
List of @Entity of study_material which will contain List<stydy_material_history> with entities - the max values from study_material_history per day (using rep_date) (for each study_material respectively)

I have 2 tables in mysql


I created entities classes:


for using spring data i create:


to reiterate question
how can i get via findAll()
List of StudyMaterial that will contain List of StudyMaterialHistoryCurrentState than will contains  items that is maximum rep_date per day.
I can`t understand where and how i must changes to get such result
assuming that both tables are filled with data next is sql variant i want express
 
Sergej Smoljanov
Ranch Hand
Posts: 472
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry one correct
instead .
but question still actual
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!