Joined: Wed Jan 11, 2006 10:28 am Posts: 19 Location: Fano, Italy
|
Hibernate version:
3.1.3
Name and version of the database you are using:
HSQLDB 1.8.1
I have a complex class with some collections of complex child objects and some collections of simple objects... like this
public class Data
{
...
public List<MD_ApplicationSchemaInformation> getApplicationSchemaInfo()
{
...
return applicationSchemaInfo;
}
public List<String> getHierarchyLevelName()
{
return hierarchyLevelName;
}
...
}
mapped like this:
<idbag name="applicationSchemaInfo" lazy="true" cascade="save-update" table="MDT_APPSCHEMAINFOS">
<collection-id type="long" column="MDT_APPSCHEMAINFOS_ID">
<generator class="sequence" />
</collection-id>
<key column="APPSCHEMAINFO_ID" />
<many-to-many class="it.terranova.metadata.iso19115.applicationschema.MD_ApplicationSchemaInformation"
column="applicationSchemaInfo" />
</idbag>
<idbag name="hierarchyLevelName" lazy="true" cascade="save-update" table="MDT_HLEVELNAMES">
<collection-id type="long" column="MDT_HLEVELNAMES_ID">
<generator class="sequence" />
</collection-id>
<key column="HLEVELNAME_ID" />
<element type="string" column="hierarchyLevelName" not-null="true" />
</idbag>
the problem is that when i try to remove a complex object from a collection (getCollection().remove(object)) all works correctly, but when i try to remove a simple object (like strings) i need to call the getCollection().remove(object) twice for obtain the correct result.
I have disabled the cache but the result is the same.
<!-- Use the C3P0 connection pool. -->
<property name="c3p0.min_size">5</property>
<property name="c3p0.max_size">20</property>
<property name="c3p0.timeout">300</property>
<property name="c3p0.max_statements">50</property>
<property name="c3p0.idle_test_period">3000</property>
<!-- Disable second-level cache. -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
<property name="cache.use_query_cache">false</property>
<property name="cache.use_minimal_puts">false</property>
<property name="max_fetch_depth">3</property>
Any suggestion?
|
|