Hibernate version: 3.1
Name and version of the database you are using: PostgreSQL 8.1
Hi, I'm using composite-element to map this: A list of instructions. I have operations, an operation is composed by an ordered list of instructions. This is part of my mapping:
Code:
...
<joined-subclass name="Operacion">
<key column="idConfigurable"/>
<property name="primitiva" column="esPrimitiva" not-null="true"/>
<properties name="props" unique="true">
<many-to-one name="verbo" not-null="true"/>
<many-to-one name="entidad" not-null="true"/>
<property name="restoDelNombre" length="25"/>
</properties>
<list name="instrucciones" table="Instruccion" cascade="all">
<key column="idOperacion"/>
<list-index column="orden"/>
<composite-element class="Instruccion">
<parent name="operacion"/>
<many-to-one name="operacionInvocada" column="idOperacionInvocada"/>
</composite-element>
</list>
...
The problem is, when I remove an instruction and commit... nothing happens! I've tried addding cascade="all", but still nothing happens.
This is an example of the code:
Code:
op.getInstrucciones().remove(n);
t.commit();
I've tried replacing the full "instrucciones" set with a newly constructed list, but still nothing happens... (and there's no Hibernate debug output either)
Thanks for any help!