Hibernate Tip: How to map an entity to multiple tables

preview_player
Показать описание

Today I will answer a question about the mapping of entities to multiple database tables. But before we discuss it in detail, please subscribe and hit the bell icon to get a new hibernate tip video every week.

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

Like my channel? Subscribe!

Join the free Member Library:

Want to connect with me?
Рекомендации по теме
Комментарии
Автор

Hi How can you update a column in the secondary table without effecting changes in the primary table. In my scenario the 2 tables are not related

benjamine.ndugga
Автор

Please note that @SecondaryTable annotation will always do left outer join. Or can we do inner joins? let me know

LikhithBC
Автор

Thank you for sharing this tip in a short concise video. Quite useful!!

janettheresjohn
Автор

Ok. It is top to bottom join. What about join of child table to a parent and result set has child table columns, plus some columns from parent table?

olegvorkunov
Автор

I performed a Delete operation on the Entity, but the record is NOT getting deleted from the Secondary Table. Does any other annotation need to be added so that the Delete operation will get cascaded to the secondary table?

chandraprakashjangid
Автор

Excellent quality video, however what about the case you need to map more than 2 tables of the same database?

samuelmora
Автор

Can you use this for more than two (2) tables ?

knowwhere
Автор

Can you help me, what is the emf at this line?
EntityManager em = emf.createEntityManager();

ibrahimcetin
Автор

But what if I only need I'd of child object instead of whole object

shubhamtiwari
welcome to shbcf.ru