Using DTOs with JPA

Поделиться
HTML-код
  • Опубликовано: 19 окт 2024

Комментарии • 19

  • @aziztolearn
    @aziztolearn 2 года назад +2

    thank you Mr Spilca. You're doing great work for us

  • @laurspilca
    @laurspilca  2 года назад +5

    Code on GitHub: github.com/lspil/youtubechannel/tree/master/jpa_with_dtos

  • @thebibeksaha
    @thebibeksaha 2 года назад +1

    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

  • @MateoEstudiante
    @MateoEstudiante Год назад +1

    Thanks for the tutorial, I learnt a lot 😊

  • @acronis536
    @acronis536 2 года назад +1

    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)

    • @laurspilca
      @laurspilca  2 года назад

      Yes. I think that's a good summary.

  • @abbasmastan7793
    @abbasmastan7793 Год назад

    sir please make a separate video using custom mapper class for dto in layer architecture with diagram I am waiting for such a amazing context

  • @lenigaussgauss2428
    @lenigaussgauss2428 2 года назад +1

    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

    • @laurspilca
      @laurspilca  2 года назад +2

      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: ruclips.net/video/FgGmnMq3UqE/видео.html

    • @lenigaussgauss2428
      @lenigaussgauss2428 2 года назад +1

      @@laurspilca Thank you so much

  • @akashdubey5516
    @akashdubey5516 2 года назад +2

    Is this part of your jpa playlist or spring playlist??

    • @laurspilca
      @laurspilca  2 года назад +2

      Nope. Just a random live to answer a question.

  • @mohamedbenhamza9014
    @mohamedbenhamza9014 Год назад

    hi,
    How the productRepository is injected without the @Repository annotation on ProductRepository interface.

    • @laurspilca
      @laurspilca  Год назад +1

      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.

    • @mohamedbenhamza9014
      @mohamedbenhamza9014 Год назад

      @@laurspilca Thanks

  • @KiranKumar-ww3zq
    @KiranKumar-ww3zq 2 года назад +1

    Can you please create one video on JPA. Where we can perform PLSQl features like procedure, views, and Functions…

    • @laurspilca
      @laurspilca  2 года назад +4

      Sure Kiran. I'll schedule a live event on this subject.

    • @KiranKumar-ww3zq
      @KiranKumar-ww3zq 2 года назад +1

      Thanks a lot..

  • @OmprakashYadavIIT
    @OmprakashYadavIIT Год назад

    Awesome video