Ver- 3.02
this is the mapping section:
Code:
<bag access="org.jvnet.hyperjaxb2.runtime.hibernate.accessor.ListAccessor" table="CRITERIA_DICTIONARY_TO_CRITERIA" cascade="all-delete-orphan" inverse="false" name="Criterion" lazy="true">
<key>
<column name="CriteriaDictionaryHashKey"/>
</key>
<many-to-many unique="true" class="com.mercado.s2002.analysis.objects.Criterion" lazy="proxy">
<column name="CriteriaHashKey"/>
</many-to-many>
</bag>
As you can see the cascade is all and inverse = "true"
When i save the obj It saves the Criterion but it dosnt update the table -CRITERIA_DICTIONARY_TO_CRITERIA
with the new relation that has created.
If i change to inverse = false. it is working .
why it dosnt work with inverse = true ?
another question , please:
I want the lazy will be true,so i tries to write anywhere in the mapping (in the default in the many-to-many, in the bag) , lazy=true (also try lazy = proxy)but it dosnt works. it fetch the list all the time.
please advice.
Thank you