Hibernate Tip: Customize the association mappings using a composite key

Опубликовано: 03 Октябрь 2024
на канале: Thorben Janssen
1,432
27

Get more recipes like this one in my new book Hibernate Tips: More than 70 solutions to common Hibernate problems: https://goo.gl/XfywNk

If you don’t provide any additional information about your association mapping, Hibernate uses default names for the foreign key columns. They follow the pattern association attribute name & primary key attribute name. That means that books_id is the default name for an association that’s mapped by the books attribute, and that references an entity with a primary key column called id.

If you like this video, please give me your thumbs up and share it with your friends and co-workers.

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

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

Read the accompanying post: https://thoughts-on-java.org/hibernat...

Want to connect with me?
Blog: http://www.thoughts-on-java.org/
Twitter:   / thjanssen123  
Facebook:   / thoughtsonjava  

#hibernatetips #AssociationMapping #CompositeKey