Тёмный

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

Thorben Janssen
Подписаться 40 тыс.
Просмотров 50 тыс.
50% 1

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

Наука

Опубликовано:

 

26 ноя 2017

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 9   
@hichamlasfar
@hichamlasfar 5 лет назад
Hello, thank you for your useful video. I have just one remark/question. You told us to avoid using Cascadetype.REMOVE but in 6:30 you used Cascadetype.ALL (which include REMOVE Cascading) with orphanRemoval. Is it a mistake? Or the fact that there is an orphanRemoval hides the cascading removal? Thanks in advance
@ravibeli
@ravibeli 6 лет назад
Pretty neat explanation. Thanks for your effort create such interactive video... I am curious to read your book :)
@ThoughtsOnJava
@ThoughtsOnJava 6 лет назад
Thank you :-)
@rajanikakita2106
@rajanikakita2106 6 лет назад
Very useful video
@ThoughtsOnJava
@ThoughtsOnJava 6 лет назад
Thanks
@hippiestafarii
@hippiestafarii Год назад
A must see tks bro :-)
Далее
Hibernate Tip: How to escape table and column names
2:22
Beautiful sport😍
00:20
Просмотров 237 тыс.
JPA & Hibernate: Basic Annotations You Need To Know
15:11
Difference between JPA, EclipseLink & Hibernate
10:20
How to generate primary keys with JPA and Hibernate
9:08
7 Tips to improve your Hibernate performance
23:44
Просмотров 31 тыс.
An Introduction to JPA FetchTypes
7:10
Просмотров 15 тыс.
Здесь упор в процессор
18:02
Просмотров 382 тыс.
Собираем комп за 500 000 рублей!
6:44:35
Здесь упор в процессор
18:02
Просмотров 382 тыс.