-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: List of components ("composite-element") doesn't g
PostPosted: Thu Dec 15, 2005 2:09 pm 
Beginner
Beginner

Joined: Fri Jul 22, 2005 3:35 pm
Posts: 24
Location: Buenos Aires, Argentina
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!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 2:49 pm 
Newbie

Joined: Sun Aug 07, 2005 3:55 am
Posts: 11
Location: slovakia
well i guess you should definitely update the entity that owns the collection ... shouldn't you ?!


Top
 Profile  
 
 Post subject:
PostPosted: Thu Dec 15, 2005 4:55 pm 
Beginner
Beginner

Joined: Fri Jul 22, 2005 3:35 pm
Posts: 24
Location: Buenos Aires, Argentina
jkares wrote:
well i guess you should definitely update the entity that owns the collection ... shouldn't you ?!


Heh! true! thanks! =)


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.