• Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Sergej Smoljanov
Ranch Hand
Posts: 470
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: 470
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry one correct
instead .
but question still actual
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!