Register / Login
this forum made possible by our volunteer staff, including ...
Stephan van Hulst
Object Relational Mapping
Hibernate :Usage of inverse attribute on a Collection Property
Ravi Kiran Va
posted 7 years ago
I did a One to Many example in Hibernate .
I took a Student Pojo , and a Address POJO .
Assuming the scenario as
(A Student can have many Addresses)
If i use the option as inverse = true on to the Set tag of my Student hbm file , it works fine
But if i dont use this attribute On to the Set tag , it throws an Exception as ConstraintViolationException .
I heard that we use inverse attribute to make it bidirectional .
Please share your ideas why is it happening
(Its only a Unidirectioanl relation between two POJOs only at the
Save India From Corruption - Anna Hazare.
Boost this thread!
inverse attribute - too confusing !!!
inverse attribute in hibernate
What is good option to use inverse with Parent or on a Child POJO
Hibernate POJOs -- association or no-association ?
unique=true in hibernate