I try to reseolve this problem by the SelectMethod property of the driver to Cursor.
The GuiSgp is just a class that instanciates a session and opens it.
The next is the relevant stacktrace:
Hibernate: select usuario0_.P_IdUsuario as P_IdUsua1_0_, usuario0_.A_Usuario as A_Usuario0_ from T_Usuario usuario0_ where usuario0_.P_IdUsuario=?
Hibernate: select tipoevento0_.P_IdTipoEvento as P_IdTipo1_, tipoevento0_.A_Nombre as A_Nombre, tipoevento0_.A_Tipo as A_Tipo from T_TipoEvento tipoevento0_
Hibernate: select producto0_.P_IdElementoEditorial as P_IdElem1_1_, producto0_.P_IdElementoEditorial as P_IdElem1_12_1_, producto0_.F_IdOrganizacion as F_IdOrga2_12_1_, producto0__1_.A_Nombre as A_Nombre11_1_, producto0__1_.A_Habilitado as A_Habili3_11_1_, producto0__1_.A_Orden as A_Orden11_1_, producto0__1_.A_BajaLogica as A_BajaLo5_11_1_, organizaci1_.P_IdOrganizacion as P_IdOrga1_0_, organizaci1_.A_RazonSocial as A_RazonS2_0_, organizaci1_.A_Predeterminada as A_Predet3_0_, organizaci1_.A_BajaLogica as A_BajaLo4_0_ from T_Producto producto0_ inner join T_ElementoEditorial producto0__1_ on producto0_.P_IdElementoEditorial=producto0__1_.P_IdElementoEditorial left outer join T_Organizacion organizaci1_ on producto0_.F_IdOrganizacion=organizaci1_.P_IdOrganizacion where producto0_.P_IdElementoEditorial=?
Hibernate: select suplemento0_.P_IdElementoEditorial as P_IdElem1___, suplemento0_.F_IdProducto as F_IdProd2___, suplemento0_.P_IdElementoEditorial as P_IdElem1_0_, suplemento0_.P_IdElementoEditorial as P_IdElem1_13_0_, suplemento0_.F_IdProducto as F_IdProd2_13_0_, suplemento0__1_.A_Nombre as A_Nombre11_0_, suplemento0__1_.A_Habilitado as A_Habili3_11_0_, suplemento0__1_.A_Orden as A_Orden11_0_, suplemento0__1_.A_BajaLogica as A_BajaLo5_11_0_ from T_Suplemento suplemento0_ inner join T_ElementoEditorial suplemento0__1_ on suplemento0_.P_IdElementoEditorial=suplemento0__1_.P_IdElementoEditorial where suplemento0_.F_IdProducto=?
Hibernate: select secciones0_.P_IdElementoEditorial as P_IdElem1___, secciones0_.F_IdSuplemento as F_IdSupl2___, secciones0_.P_IdElementoEditorial as P_IdElem1_0_, secciones0_.P_IdElementoEditorial as P_IdElem1_14_0_, secciones0_.F_IdSuplemento as F_IdSupl2_14_0_, secciones0__1_.A_Nombre as A_Nombre11_0_, secciones0__1_.A_Habilitado as A_Habili3_11_0_, secciones0__1_.A_Orden as A_Orden11_0_, secciones0__1_.A_BajaLogica as A_BajaLo5_11_0_ from T_Seccion secciones0_ inner join T_ElementoEditorial secciones0__1_ on secciones0_.P_IdElementoEditorial=secciones0__1_.P_IdElementoEditorial where secciones0_.F_IdSuplemento=?
Hibernate: update T_ElementoEditorial set A_Nombre=?, A_Habilitado=?, A_Orden=?, A_BajaLogica=? where P_IdElementoEditorial=?
Hibernate: update T_Seccion set F_IdSuplemento=? where P_IdElementoEditorial=?
Jan 16, 2004 1:04:52 PM net.sf.hibernate.StaleObjectStateException <init>
SEVERE: An operation failed due to stale data
net.sf.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect) for Productos.Seccion instance with identifier: 0
at net.sf.hibernate.persister.AbstractEntityPersister.check(AbstractEntityPersister.java:505)
at net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:671)
at net.sf.hibernate.persister.NormalizedEntityPersister.update(NormalizedEntityPersister.java:646)
at net.sf.hibernate.impl.ScheduledUpdate.execute(ScheduledUpdate.java:52)
at net.sf.hibernate.impl.SessionImpl.executeAll(SessionImpl.java:2308)
at net.sf.hibernate.impl.SessionImpl.execute(SessionImpl.java:2262)
at net.sf.hibernate.impl.SessionImpl.flush(SessionImpl.java:2187)
at net.sf.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:61)
|