JPA / Hibernate Marathon

แชร์
ฝัง
  • เผยแพร่เมื่อ 13 ต.ค. 2024
  • Buy me a coffee ☕👉 buymeacoffee.c...
    A marathon day on JPA and Hibernate.

ความคิดเห็น • 19

  • @jarekjal
    @jarekjal 8 หลายเดือนก่อน +1

    regarding the problem with title being null after merge (at 1:51:00). according to hibernate documentation: "Merging is the process of taking an incoming entity instance that is in the detached state and copying its data over onto a new managed instance." - so it is new instance created, so you should to assign the value returned by em.merge(b1) back to b1. other way you continue working on old unmanaged instance and you have still null in title field ;)

    • @laurspilca
      @laurspilca  8 หลายเดือนก่อน

      Yes!!!! You are totally right! I did forget that! Man, it's the age!

  • @OsteenOmega
    @OsteenOmega 6 หลายเดือนก่อน

    Do you its a good practise using stored procedures today? or should all the logic be placed the application level?

  • @temptrue3322
    @temptrue3322 6 หลายเดือนก่อน

    Thank you Laur, good intro to hibernate

    • @laurspilca
      @laurspilca  6 หลายเดือนก่อน

      Welcome :)

  • @OsteenOmega
    @OsteenOmega 7 หลายเดือนก่อน +1

    hello. is it necessary to use the cascade feature of jpa if already defined in your sql schema? example, we usually use the ON UPDATE, and ON DELETE , during schema definition

    • @laurspilca
      @laurspilca  7 หลายเดือนก่อน

      Hi. Yes. It make sense for the code to reflect the DB definitions. At least I would do that for clarity.

  • @mils3318
    @mils3318 8 หลายเดือนก่อน

    Thanks Laur

  • @maksadnahibhoolna-wc2ef
    @maksadnahibhoolna-wc2ef 4 หลายเดือนก่อน

    Are there more episodes into this series ?

    • @laurspilca
      @laurspilca  4 หลายเดือนก่อน

      This was a marathon. But you can find a whole playlist on JPA here on this channel :)

    • @maksadnahibhoolna-wc2ef
      @maksadnahibhoolna-wc2ef 4 หลายเดือนก่อน

      @@laurspilca sure Laur

  • @FatimaBoulila-b1e
    @FatimaBoulila-b1e 8 หลายเดือนก่อน

    Merci

  • @jarekjal
    @jarekjal 8 หลายเดือนก่อน +1

    you couldn't prove getReference() method behaviour probably because your Intellij settings, try to uncheck Settings -> Build -> Debugger -> DataViews -> Java -> Enable toString() object veiw option (at least in my Community version it solved the issue, and is helpful with debugging Hibernate lazy loading also)

    • @laurspilca
      @laurspilca  8 หลายเดือนก่อน

      Yes. I thought it's Intellij!

  • @gheorghitabutnaru4455
    @gheorghitabutnaru4455 8 หลายเดือนก่อน

    Hello! I observed that we can not use LIMIT constraint in a JPQL query. Is there an alternative?

    • @gheorghitabutnaru4455
      @gheorghitabutnaru4455 8 หลายเดือนก่อน

      But without using native queries?

    • @laurspilca
      @laurspilca  8 หลายเดือนก่อน

      @@gheorghitabutnaru4455 Hello. Yes. Limit is not an option in JPQL. You can use the setMaxResults() method on the Query object for this :)

  • @MonsterBebesi-cd7ot
    @MonsterBebesi-cd7ot 8 หลายเดือนก่อน

    githupp ??

    • @laurspilca
      @laurspilca  8 หลายเดือนก่อน +1

      github.com/lspil/youtubechannel/tree/master/jpa_marathon_e1