Hi Laur! First of all I love your books and videos and I am currently following your JPA livestreams but I can see you are also doing livestreams on Spring Data JPA, if it is not too much to ask can you please bundle them together into a playlist, that would be very very helpful
From my understanding @Transactional (readonly=true) is a mechanism through which the initial entity state(fetched from the database) will not be kept in the context anymore (for dirty checking purposes) so it would save some memory. and also some CPU cycles...since dirty checking will be skipped (because there is no initial state to compare your entity to anymore)
Hello Sir Thanks again for this great course. I want to know please, why are you using three double qotes in the @Query anotation rather than one double qote
Hi. I'm using the new Java text blocks syntax. It helps you easier write Strings on more lines. Because usually in practice JPQL and SQL queries are on multiple lines, using text blocks is very helpful. Check out this video where text blocks are also described: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-FgGmnMq3UqE.html
Hi. Good question. Rememeber first the role of the @Repository annotation. This annotation is part of the family that we call stereotype annotations together with @Component, @Service and @Controller. The purpose of a stereotype annotation is to tell Spring to create an instance of the annotated class and add it to the app context. That is why you never use a stereotype annotation with any abstract structure. It makes not sense to add any of these annotations on interfaces and abstract classes since they can't create instances, therefore a stereotype annotation here is useless. In this case, Spring Data uses dynamic proxies and registers itself an instance in the app context. This instance can be injected now using @Autowired. I hope this helps you understand this case.