Pertanyaan dan Jawaban Wawancara Paling Populer & Tes Online
Platform edukasi untuk persiapan wawancara, tes online, tutorial, dan latihan langsung

Bangun keterampilan dengan jalur belajar terfokus, tes simulasi, dan konten siap wawancara.

WithoutBook menghadirkan pertanyaan wawancara per subjek, tes latihan online, tutorial, dan panduan perbandingan dalam satu ruang belajar yang responsif.

Prepare Interview

Hibernate Pertanyaan dan Jawaban Wawancara

Question: What does it mean to be inverse?
Answer: It informs hibernate to ignore that end of the relationship. If the one-to-many was marked as inverse, hibernate would create a child->parent relationship (child.getParent). If the one-to-many was marked as non-inverse then a child->parent relationship would be created.

In Hibernate, only the ā€œrelationship ownerā€ should maintain the relationship, and the ā€œinverseā€ keyword is created to defines which side is the owner to maintain the relationship. However the ā€œinverseā€ keyword itself is not verbose enough, I would suggest change the keyword to ā€œrelationship_ownerā€œ.

In short, inverse=ā€trueā€ means this is the relationship owner, and inverse=ā€falseā€ (default) means it’s not.

Suppose Stock is parent and StockDailyRecords is Child object.

Inverse keyword is applied in one to many relationship. Here’s the question, if save or update operation perform in ā€œStockā€ object, should it update the ā€œstockDailyRecordsā€ relationship?

1. inverse=ā€trueā€
If inverse=ā€trueā€ in the set variable, it means ā€œstock_daily_recordā€ is the relationship owner, so Stock will NOT UPDATE the relationship.

2. inverse=ā€falseā€
If inverse=ā€falseā€ (default) in the set variable, it means ā€œstockā€ is the relationship owner, and Stock will UPDATE the relationship.

If keyword ā€œinverseā€ is not define, the inverse = ā€œfalseā€ will be used, which is

Simpan untuk Revisi

Bookmark item ini, tandai sebagai sulit, atau masukkan ke dalam set revisi.

Buka Perpustakaan Belajar Saya
Apakah ini membantu? Ya Tidak

Most helpful rated by users:

Hak Cipta Ā© 2026, WithoutBook.