Hibernate: Modeling Self-referencing Associations

Опубликовано: 03 Октябрь 2024
на канале: Thorben Janssen
4,254
112

When you model a hierarchical data structure, you often have to use self-referencing associations. Both ends of these associations are of the same type. In other words, the entity object on which the association is defined and the one the association references are of the same type. In your database, you model that using a foreign key column that references the same table’s primary key.

In this video, I want to show you Modeling self-referencing associations with Hibernate

Links mentioned:
LazyInitializationException – What it is and the best way to fix it
https://thorben-janssen.com/lazyiniti...

Like my channel? Subscribe!
➜ http://bit.ly/2cUsid8

Join the free Member Library:
https://goo.gl/dtyIIC

Read the accompanying post: https://thorben-janssen.com/self-refe...

Want to connect with me?
Blog: https://thorben-janssen.com/
Twitter:   / thjanssen123  
Facebook:   / thoughtsonjava  

#Hibernate #self-referencing #associations