Best Practices for Many-To-One and One-To-Many Association Mappings

Поділитися
Вставка
  • Опубліковано 26 лис 2017
  • Today, I want to talk about best practices for many-to-one and one-to-many association mappings.
    When you model your database, you will most likely define several of these associations. And it’s, of course, the same when you model your entities. It’s quite easy to do that with JPA and Hibernate. You just need an attribute that represents the association and annotate it with a @ManyToOne or @OneToMany association. But as easy as it seems, there are several pitfalls that you can avoid by following a few best practices.
    Why you should avoid CascadeType.REMOVE for to-many associations and what to do instead:- • Why you should avoid C...
    If you like this video, please give me your thumbs up and share it with your friends and co-workers.
    Like my channel? Subscribe!
    ➜ bit.ly/2cUsid8
    Join the free Member Library:
    goo.gl/dtyIIC
    Read the accompanying post: www.thoughts-on-java.org/best...
    Want to connect with me?
    Blog: www.thoughts-on-java.org/
    Twitter: / thjanssen123
    Facebook: / thoughtsonjava

КОМЕНТАРІ • 9

  • @hichamlasfar
    @hichamlasfar 5 років тому +6

    Hello, thank you for your useful video. I have just one remark/question. You told us to avoid using Cascadetype.REMOVE but in

  • @ravibeli
    @ravibeli 6 років тому +2

    Pretty neat explanation. Thanks for your effort create such interactive video... I am curious to read your book :)

  • @rajanikakita2106
    @rajanikakita2106 6 років тому +3

    Very useful video

  • @hippiestafarii
    @hippiestafarii Рік тому

    A must see tks bro :-)