-->
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.  [ 6 posts ] 
Author Message
 Post subject: Saving but not updating a many-to-many relationship
PostPosted: Sun Mar 01, 2009 2:11 pm 
Newbie

Joined: Thu Feb 19, 2009 8:06 am
Posts: 5
I'm having trouble with this. When I save the object the intermediate table is updated with new inserts but nothing happens when I update the object. Here are the hbm files. The relationship I'm interested in is the one with SdxTipoperf. The table SDM_ALPRPERF is not being modified when I update SDM_ALERTA. Thank you all.

SdmAlerta
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="xx.xxxx.xxxxxx.model.SdmAlerta" table="SDM_ALERTA">
   <id
        name="pkAlerta"
        type="long"
        column="PK_ALERTA"
        length="22"
    >
      <generator class="sequence">
         <param name="sequence">sec_SDM_ALERTA</param>
      </generator>
   </id>
   <property
        name="alactivo"
        type="long"
        column="ALACTIVO"
        length="22"
    />
   <property
        name="alconsulta"
        type="clob"
        column="ALCONSULTA"
        length="4000"
    />
   <property
        name="alfechcrea"
        type="date"
        column="ALFECHCREA"
        not-null="true"
        length="7"
    />
   <property
        name="alnombre"
        type="string"
        column="ALNOMBRE"
        length="50"
    />
   <property
        name="alobservac"
        type="string"
        column="ALOBSERVAC"
        length="250"
    />

   <!-- Associations -->
   <!-- uni-directional many-to-many association to SdxUsuario -->
   <set
        name="sdxUsuarios"
        table="SDM_ALPORUSU"
        lazy="true"
    >
      <key>
         <column name="PK_ALERTA" not-null="true" />
          <!-- a foreign key in SDM_ALPORUSU referencing the primary key of this table. -->
      </key>
      <many-to-many class="xx.xxxx.xxxxxx.model.SdxUsuario">
         <column name="PK_PERSONA" not-null="true" />
          <!-- a foreign key in SDM_ALPORUSU referencing the primary key of SDX_USUARIO. -->
      </many-to-many>
   </set>
   <!-- uni-directional many-to-many association to SdxTipoperf -->
   <set
        name="sdxTipoperfs"
        table="SDM_ALPRPERF"
        lazy="true"
    >
      <key>
         <column name="PK_ALERTA" not-null="true" />
          <!-- a foreign key in SDM_ALPRPERF referencing the primary key of this table. -->
      </key>
      <many-to-many class="xx.xxxx.xxxxxx.model.SdxTipoperf">
         <column name="PK_TIPOPERF" not-null="true" />
          <!-- a foreign key in SDM_ALPRPERF referencing the primary key of SDX_TIPOPERF. -->
      </many-to-many>
   </set>

</class>
</hibernate-mapping>



SdxTipoperf
Code:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC
    "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
    "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">

<hibernate-mapping>
<class name="xx.xxxxx.xxxxxx.model.SdxTipoperf" table="SDX_TIPOPERF">
   <id
        name="pkTipoperf"
        type="long"
        column="PK_TIPOPERF"
        length="22"
    >
      <generator class="sequence">
         <param name="sequence">sec_SDX_TIPOPERF</param>
      </generator>
   </id>
   <property
        name="ticodigo"
        type="string"
        column="TICODIGO"
        not-null="true"
        length="2"
    />
   <property
        name="tidesc"
        type="string"
        column="TIDESC"
        length="100"
    />
   <property
        name="tifechcrea"
        type="date"
        column="TIFECHCREA"
        not-null="true"
        length="7"
    />
   <property
        name="tipactivo"
        type="long"
        column="TIPACTIVO"
        not-null="true"
        length="22"
    />
</class>
</hibernate-mapping>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 2:00 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
Try putting cascade="save-update" to many-to-many tag.

_________________
Regards,
Litty Preeth


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 3:06 am 
Newbie

Joined: Thu Feb 19, 2009 8:06 am
Posts: 5
I've tried with cascade="all" and it doesn't work. I guess it won't work with cascade="save-update" but I'll try anyway. By the way, I'm using merge to update the SdmAlerta object.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 3:37 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
Can u post the
    * code where you are loading, updating the SdmAlerta
    * The SQL fired

_________________
Regards,
Litty Preeth


Top
 Profile  
 
 Post subject:
PostPosted: Mon Mar 02, 2009 12:09 pm 
Newbie

Joined: Thu Feb 19, 2009 8:06 am
Posts: 5
SdmAlerta is loaded in Flex but it comes loaded when saving and when updating. There's no SQL fired. All I can post is this:


When saving/inserting:
Code:
16:59:56,030 DEBUG org.hibernate.persister.entity.AbstractEntityPersister,http-8083-Processor21:2209 - Inserting entity: [xx.xxxxx.xxxxxx.model.SdmAlerta#241]
16:59:56,030 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
16:59:56,030 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:401 - insert into SDM_ALERTA (ALACTIVO, ALCONSULTA, ALFECHCREA, ALNOMBRE, ALOBSERVAC, PK_ALERTA) values (?, ?, ?, ?, ?, ?)
16:59:56,030 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:484 - preparing statement
16:59:56,030 DEBUG org.hibernate.persister.entity.AbstractEntityPersister,http-8083-Processor21:1997 - Dehydrating entity: [xx.xxxxx.xxxxxx.model.SdmAlerta#241]
16:59:56,030 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '1' to parameter: 1
16:59:56,030 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '02 marzo 2009' to parameter: 3
16:59:56,030 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding 'Hibernate forum' to parameter: 4
16:59:56,030 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding 'Hibernate forum' to parameter: 5
16:59:56,030 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '241' to parameter: 6
16:59:56,030 DEBUG org.hibernate.jdbc.BatchingBatcher,http-8083-Processor21:44 - Executing batch size: 1
16:59:56,077 DEBUG org.hibernate.jdbc.Expectations$BasicExpectation,http-8083-Processor21:53 - success of batch update unknown: 0
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:533 - closing statement
16:59:56,077 DEBUG org.hibernate.persister.collection.AbstractCollectionPersister,http-8083-Processor21:1090 - Inserting collection: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxUsuarios#241]
16:59:56,077 DEBUG org.hibernate.persister.collection.AbstractCollectionPersister,http-8083-Processor21:1178 - collection was empty
16:59:56,077 DEBUG org.hibernate.persister.collection.AbstractCollectionPersister,http-8083-Processor21:1090 - Inserting collection: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxTipoperfs#241]
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:401 - insert into SDM_ALPRPERF (PK_ALERTA, PK_TIPOPERF) values (?, ?)
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:484 - preparing statement
16:59:56,077 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '241' to parameter: 1
16:59:56,077 DEBUG org.hibernate.engine.IdentifierValue,http-8083-Processor21:104 - id unsaved-value: null
16:59:56,077 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '1' to parameter: 2
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:226 - reusing prepared statement
16:59:56,077 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor21:401 - insert into SDM_ALPRPERF (PK_ALERTA, PK_TIPOPERF) values (?, ?)
16:59:56,077 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '241' to parameter: 1
16:59:56,077 DEBUG org.hibernate.engine.IdentifierValue,http-8083-Processor21:104 - id unsaved-value: null
16:59:56,077 DEBUG org.hibernate.type.NullableType,http-8083-Processor21:133 - binding '43' to parameter: 2
16:59:56,077 DEBUG org.hibernate.persister.collection.AbstractCollectionPersister,http-8083-Processor21:1172 - done inserting collection: 2 rows inserted





When updating/merging
Code:
17:05:20,195 DEBUG org.hibernate.event.def.DefaultFlushEntityEventListener,http-8083-Processor22:236 - Updating entity: [xx.xxxxx.xxxxxx.model.SdmAlerta#241]
17:05:20,210 DEBUG org.hibernate.engine.Collections,http-8083-Processor22:176 - Collection found: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxUsuarios#241], was: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxUsuarios#241] (initialized)
17:05:20,210 DEBUG org.hibernate.engine.Collections,http-8083-Processor22:176 - Collection found: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxTipoperfs#241], was: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxTipoperfs#241] (initialized)
17:05:20,210 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:210 - Processing unreferenced collections
17:05:20,210 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:224 - Scheduling collection removes/(re)creates/updates
17:05:20,226 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:85 - Flushed: 0 insertions, 1 updates, 0 deletions to 6 objects
17:05:20,226 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:91 - Flushed: 0 (re)creations, 0 updates, 0 removals to 2 collections
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:83 - listing entities:
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Grabador, tipactivo=1, pkTipoperf=1, ticodigo=GR, tifechcrea=10 diciembre 2008}
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Comisión, tipactivo=1, pkTipoperf=43, ticodigo=CM, tifechcrea=24 febrero 2009}
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Valorador, tipactivo=1, pkTipoperf=62, ticodigo=VA, tifechcrea=26 febrero 2009}
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Administrativo, tipactivo=1, pkTipoperf=61, ticodigo=AD, tifechcrea=26 febrero 2009}
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Consulta comisión, tipactivo=1, pkTipoperf=44, ticodigo=CC, tifechcrea=24 febrero 2009}
17:05:20,226 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdmAlerta{alconsulta=null, alfechcrea=02 marzo 2009, alobservac=Hibernate forum (updating), sdxTipoperfs=[xx.xxxxx.xxxxxx.model.SdxTipoperf#62, xx.xxxxx.xxxxxx.model.SdxTipoperf#61, xx.xxxxx.xxxxxx.model.SdxTipoperf#43, xx.xxxxx.xxxxxx.model.SdxTipoperf#44, xx.xxxxx.xxxxxx.model.SdxTipoperf#1], pkAlerta=241, alactivo=1, sdxUsuarios=[], alnombre=Hibernate forum}
17:05:20,226 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:290 - executing flush
17:05:20,226 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:469 - registering flush begin
17:05:20,226 DEBUG org.hibernate.persister.entity.AbstractEntityPersister,http-8083-Processor22:2344 - Updating entity: [xx.xxxxx.xxxxxx.model.SdmAlerta#241]
17:05:20,226 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
17:05:20,226 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:401 - update SDM_ALERTA set ALACTIVO=?, ALCONSULTA=?, ALFECHCREA=?, ALNOMBRE=?, ALOBSERVAC=? where PK_ALERTA=?
17:05:20,226 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:484 - preparing statement
17:05:20,226 DEBUG org.hibernate.persister.entity.AbstractEntityPersister,http-8083-Processor22:1997 - Dehydrating entity: [xx.xxxxx.xxxxxx.model.SdmAlerta#241]
17:05:20,226 DEBUG org.hibernate.type.NullableType,http-8083-Processor22:133 - binding '1' to parameter: 1
17:05:20,226 DEBUG org.hibernate.type.NullableType,http-8083-Processor22:133 - binding '02 marzo 2009' to parameter: 3
17:05:20,226 DEBUG org.hibernate.type.NullableType,http-8083-Processor22:133 - binding 'Hibernate forum' to parameter: 4
17:05:20,226 DEBUG org.hibernate.type.NullableType,http-8083-Processor22:133 - binding 'Hibernate forum (updating)' to parameter: 5
17:05:20,226 DEBUG org.hibernate.type.NullableType,http-8083-Processor22:133 - binding '241' to parameter: 6
17:05:20,226 DEBUG org.hibernate.jdbc.BatchingBatcher,http-8083-Processor22:44 - Executing batch size: 1
17:05:20,226 DEBUG org.hibernate.jdbc.Expectations$BasicExpectation,http-8083-Processor22:53 - success of batch update unknown: 0
17:05:20,226 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:374 - about to close PreparedStatement (open PreparedStatements: 1, globally: 1)
17:05:20,226 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:533 - closing statement
17:05:20,226 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:478 - registering flush end
17:05:20,226 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:321 - post flush
17:05:20,226 DEBUG org.hibernate.jdbc.JDBCContext,http-8083-Processor22:205 - before transaction completion
17:05:20,241 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:393 - before transaction completion
17:05:20,241 DEBUG org.hibernate.transaction.JDBCTransaction,http-8083-Processor22:193 - re-enabling autocommit
17:05:20,241 DEBUG org.hibernate.transaction.JDBCTransaction,http-8083-Processor22:116 - committed JDBC Connection
17:05:20,241 DEBUG org.hibernate.jdbc.JDBCContext,http-8083-Processor22:219 - after transaction completion
17:05:20,241 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:302 - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
17:05:20,241 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:422 - after transaction completion
17:05:20,257 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:374 - disconnecting session
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:380 - performing cleanup
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:441 - releasing JDBC connection [ (open PreparedStatements: 0, globally: 0) (open ResultSets: 0, globally: 0)]
17:05:20,257 DEBUG org.hibernate.jdbc.JDBCContext,http-8083-Processor22:219 - after transaction completion
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:302 - transaction completed on session with on_close connection release mode; be sure to close the session to release JDBC resources!
17:05:20,257 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:422 - after transaction completion
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:58 - flushing session
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:111 - processing flush-time cascades
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:154 - dirty checking collections
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:171 - Flushing entities and processing referenced collections
17:05:20,257 DEBUG org.hibernate.engine.Collections,http-8083-Processor22:176 - Collection found: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxUsuarios#241], was: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxUsuarios#241] (initialized)
17:05:20,257 DEBUG org.hibernate.engine.Collections,http-8083-Processor22:176 - Collection found: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxTipoperfs#241], was: [xx.xxxxx.xxxxxx.model.SdmAlerta.sdxTipoperfs#241] (initialized)
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:210 - Processing unreferenced collections
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:224 - Scheduling collection removes/(re)creates/updates
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:85 - Flushed: 0 insertions, 0 updates, 0 deletions to 6 objects
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:91 - Flushed: 0 (re)creations, 0 updates, 0 removals to 2 collections
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:83 - listing entities:
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Grabador, tipactivo=1, pkTipoperf=1, ticodigo=GR, tifechcrea=10 diciembre 2008}
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Comisión, tipactivo=1, pkTipoperf=43, ticodigo=CM, tifechcrea=24 febrero 2009}
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Valorador, tipactivo=1, pkTipoperf=62, ticodigo=VA, tifechcrea=26 febrero 2009}
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Administrativo, tipactivo=1, pkTipoperf=61, ticodigo=AD, tifechcrea=26 febrero 2009}
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdxTipoperf{tidesc=Consulta comisión, tipactivo=1, pkTipoperf=44, ticodigo=CC, tifechcrea=24 febrero 2009}
17:05:20,257 DEBUG org.hibernate.pretty.Printer,http-8083-Processor22:90 - xx.xxxxx.xxxxxx.model.SdmAlerta{alconsulta=null, alfechcrea=02 marzo 2009, alobservac=Hibernate forum (updating), sdxTipoperfs=[xx.xxxxx.xxxxxx.model.SdxTipoperf#62, xx.xxxxx.xxxxxx.model.SdxTipoperf#61, xx.xxxxx.xxxxxx.model.SdxTipoperf#43, xx.xxxxx.xxxxxx.model.SdxTipoperf#44, xx.xxxxx.xxxxxx.model.SdxTipoperf#1], pkAlerta=241, alactivo=1, sdxUsuarios=[], alnombre=Hibernate forum}
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:290 - executing flush
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:469 - registering flush begin
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:478 - registering flush end
17:05:20,257 DEBUG org.hibernate.event.def.AbstractFlushingEventListener,http-8083-Processor22:321 - post flush
17:05:20,257 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:273 - closing session
17:05:20,257 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:375 - connection already null in cleanup : no action
17:05:20,351 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:220 - opened session at timestamp: 12360099203
17:05:20,351 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:273 - closing session
17:05:20,351 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:375 - connection already null in cleanup : no action
17:05:20,351 DEBUG org.hibernate.impl.SessionImpl,http-8083-Processor22:220 - opened session at timestamp: 12360099203
17:05:20,351 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:366 - about to open PreparedStatement (open PreparedStatements: 0, globally: 0)
17:05:20,351 DEBUG org.hibernate.jdbc.ConnectionManager,http-8083-Processor22:421 - opening JDBC connection
17:05:20,351 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:401 - select this_.PK_ALERTA as PK1_35_1_, this_.ALACTIVO as ALACTIVO35_1_, this_.ALCONSULTA as ALCONSULTA35_1_, this_.ALFECHCREA as ALFECHCREA35_1_, this_.ALNOMBRE as ALNOMBRE35_1_, this_.ALOBSERVAC as ALOBSERVAC35_1_, sdxtipoper2_.PK_ALERTA as PK1_3_, sdxtipoper3_.PK_TIPOPERF as PK2_3_, sdxtipoper3_.PK_TIPOPERF as PK1_29_0_, sdxtipoper3_.TICODIGO as TICODIGO29_0_, sdxtipoper3_.TIDESC as TIDESC29_0_, sdxtipoper3_.TIFECHCREA as TIFECHCREA29_0_, sdxtipoper3_.TIPACTIVO as TIPACTIVO29_0_ from SDM_ALERTA this_, SDM_ALPRPERF sdxtipoper2_, SDX_TIPOPERF sdxtipoper3_ where this_.PK_ALERTA=sdxtipoper2_.PK_ALERTA(+) and sdxtipoper2_.PK_TIPOPERF=sdxtipoper3_.PK_TIPOPERF(+) and (1=1)
17:05:20,351 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:484 - preparing statement
17:05:20,351 DEBUG org.hibernate.jdbc.AbstractBatcher,http-8083-Processor22:382 - about to open ResultSet (open ResultSets: 0, globally: 0)


Code:
   @Override
   public AbstractEntity save(AbstractEntity ae) {
      SdmAlerta sdmAlerta = (SdmAlerta)ae;
      return this.getSession().save(sdmAlerta);
   }
   
   @Override
   public AbstractEntity update(AbstractEntity ae) {
      SdmAlerta sdmAlerta = (SdmAlerta)ae;
      return this.getSession().merge(sdmAlerta);
   }


Top
 Profile  
 
 Post subject:
PostPosted: Tue Mar 03, 2009 2:57 am 
Expert
Expert

Joined: Fri Jan 30, 2009 1:47 am
Posts: 292
Location: Bangalore, India
In the debug log it says that it is processing the collections as well. May be you are not doing any changes to collection thats y its not updated.

_________________
Regards,
Litty Preeth


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 6 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.