Skip to content

Tag: spring-data-jpa

Spring Data Jpa: persisting child entities from parent entity does not update child identity

Environment: OS: Ubuntu 20.04 LTS Java: OpenJDK 17.0.3 Spring Boot: 2.6.7 MySQL: 8.0.29 Is it normal for Spring Data Jpa (or Jpa in general) to NOT update child identity attributes when the child is persisted (saved) via the parent entity repository? Consider this: When I call someClassFunction() I get: The database assigned id is NOT available to me immediately. I

Combine JPA Query annotation with Oracle sample method

i am trying to pass a parameter into a JPA query Example code But i get an error because of the sample(:percentile). If i just hardcode a number in there it works but not with a param. Is there a way to escape the brackets or something similar? Thx Answer The error is on the following part Unfortunately it does

How Spring Batch Step chunkSize and JpaPagingItemReader pageSize work together

Im developing a Spring Batch application. Although I’m getting more and more comfortable with it, I came across with something that is making me very confused. Please take a look at this step configuration. As you can see it’s a pretty standard step. My confusion is related to the chunk size (50) and the reader (processNonExportedMbfsOperationsItemReader). Reader code next: The