-->
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.  [ 10 posts ] 
Author Message
 Post subject: Rows in many-to-many tables are involuntarily deleted
PostPosted: Sat May 28, 2005 2:19 am 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
Hibernate version:
2.1.6
Mapping documents:

Code between sessionFactory.openSession() and session.close():

Full stack trace of any exception that occurs:

Name and version of the database you are using:
PostgresSQL 7.4
The generated SQL (show_sql=true):

Debug level Hibernate log excerpt:

The problem is driving me crazy, records in all many-to-many asociation tables are deleted. The error happen at any moment, after doing not necessarily the same action, I log every request in the app and I've put a trigger (on delete) in one of the tables that are affected but the last request before the trigger is executed is a different one every time, the rows affected are never the same, neither the quantity. I need to fix it as soon as posible, because the system is in a production environment. Thanks a lot

sorry for my english :-)


Top
 Profile  
 
 Post subject:
PostPosted: Sat May 28, 2005 2:39 pm 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
put more, more info. (Code,hbm,..)[url]http://www.hibernate.org/ForumMailinglists/HowToAskForHelp
[/url]
general ideas:
1) try log generated sql.
2)check if your hbm is correct.
3)create unit test for check your code;


Top
 Profile  
 
 Post subject: here there is more info
PostPosted: Sun May 29, 2005 8:39 pm 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
The system has more than 90 hbm files and I'm not sure about which one is associated with the error. The most used classes are:

Code:
<hibernate-mapping package="pait">
   <class name="Plan" table="plan">
      <id
         column="plan_id"
         name="Id"
         type="java.lang.Long"
      >
         <generator class="net.sf.hibernate.id.IncrementGenerator" />
      </id>
      <property
         column="nombre"
         name="Nombre"
         not-null="false"
         type="string"
       />
      <property
         column="antecedentes"
         name="Antecedentes"
         not-null="false"
         type="string"
       />
      <property
         column="pyme_principal_id"
         length="8"
         name="PymePrincipalId"
         not-null="false"
         type="java.lang.Long"
       />
      <property
         column="objetivo"
         name="Objetivo"
         not-null="false"
         type="string"
       />
      <property
         column="fecha_ingreso"
         length="4"
         name="FechaIngreso"
         not-null="false"
         type="date"
       />

      <many-to-one
         class="TipoPlan"
         name="TipoPlan"
         not-null="true"
      >
         <column name="tipo_plan_id" />
      </many-to-one>
      <many-to-one
         class="Facilitador"
         name="Facilitador"
         not-null="false"
      >
         <column name="facilitador_id" />
      </many-to-one>
      <many-to-one
         class="TipoEstado"
         name="TipoEstado"
         not-null="false"
      >
         <column name="tipo_estado_id" />
      </many-to-one>
      <many-to-one
         class="Usuario"
         name="Evaluador"
         not-null="false"
      >
         <column name="evaluador_usuario_id" />
      </many-to-one>
      <many-to-one
         class="Usuario"
         name="Supervisor"
         not-null="false"
      >
         <column name="supervisor_usuario_id" />
      </many-to-one>
      <many-to-one
         class="PlanillaEvaluacion"
         name="PlanillaEvaluacion"
         not-null="false"
         cascade="all"
      >
         <column name="planilla_evaluacion_id" />
      </many-to-one>
      <many-to-one
         class="ReprLegal"
         name="PasReprLegal"
                        cascade="all"
         not-null="false"
      >
         <column name="pas_repr_legal_id" />
      </many-to-one>
               
      <set inverse="true" name="BeneficiosSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="Beneficios" />
      </set>
      <set inverse="true" name="ProductoSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="Producto" />
      </set>
      <set inverse="true" name="ActividadSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="Actividad" />
      </set>
      <set inverse="true" name="CambioActividadSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="CambioActividad" />
      </set>
      <set inverse="true" name="EvaluacionSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="Evaluacion" />
      </set>
      <set inverse="true" name="ObservacionSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="Observacion" />
      </set>
      <set inverse="true" name="SolicitudReembolsoSet" cascade="delete">
         <key column="plan_id" />
         <one-to-many class="SolicitudReembolso" />
      </set>
      <set
         cascade="save-update"
         name="PstSet"
         table="pst_plan"
      >
         <key column="plan_id" />
         <many-to-many class="Pst" column="empresa_id" />
      </set>
      <set
         cascade="save-update"
         name="PymeSet"
         table="pyme_plan"
      >
         <key column="plan_id" />
         <many-to-many class="Pyme" column="empresa_id" />
      </set>
      <set
         cascade="all"
         name="VentaSet"
         table="plan_venta"
      >
         <key column="plan_id" />
         <many-to-many class="Venta" column="venta_id" />
      </set>
   </class>
</hibernate-mapping>


Code:
<hibernate-mapping package="pait">
   <class name="Pyme" table="pyme">
      <id
         column="empresa_id"
         name="Id"
         type="java.lang.Long"
      >
         <generator class="net.sf.hibernate.id.IncrementGenerator" />
      </id>
      <property
         column="act_principal"
         name="ActPrincipal"
         not-null="false"
         type="string"
       />
      <property
         column="razon"
         name="Razon"
         not-null="false"
         type="string"
       />
      <property
         column="investigacion_nombre"
         name="InvestigacionNombre"
         not-null="false"
         type="string"
       />
      <property
         column="producto_exporta"
         name="ProductoExporta"
         not-null="false"
         type="string"
       />
      <property
         column="investigacion"
         length="1"
         name="Investigacion"
         not-null="false"
         type="boolean"
       />
      <property
         column="fax"
         name="Fax"
         not-null="false"
         type="string"
       />
      <property
         column="datos_en_proceso"
         name="DatosEnProceso"
         not-null="false"
         type="string"
       />
      <property
         column="tecnologia"
         length="1"
         name="Tecnologia"
         not-null="false"
         type="boolean"
       />
      <property
         column="comercializacion"
         name="Comercializacion"
         not-null="false"
         type="string"
       />
      <property
         column="ruc"
         name="Ruc"
         not-null="false"
         type="string"
       />
      <property
         column="administracion"
         name="Administracion"
         not-null="false"
         type="string"
       />
      <property
         column="mercado_exporta"
         name="MercadoExporta"
         not-null="false"
         type="string"
       />
      <property
         column="norma_en_proceso"
         length="1"
         name="NormaEnProceso"
         not-null="false"
         type="boolean"
       />
      <property
         column="normas"
         name="Normas"
         not-null="false"
         type="string"
       />
      <property
         column="telefono"
         name="Telefono"
         not-null="false"
         type="string"
       />
      <property
         column="licencia_nombre"
         name="LicenciaNombre"
         not-null="false"
         type="string"
       />
      <property
         column="a_fundacion"
         name="AFundacion"
         not-null="false"
         type="string"
       />
      <property
         column="exportaciones"
         length="1"
         name="Exportaciones"
         not-null="false"
         type="boolean"
       />
      <property
         column="calidad"
         length="1"
         name="Calidad"
         not-null="false"
         type="boolean"
       />
      <property
         column="cedula"
         name="Cedula"
         not-null="false"
         type="string"
       />
      <property
         column="sector"
         name="Sector"
         not-null="false"
         type="string"
       />
      <property
         column="liquidez"
         name="Liquidez"
         not-null="false"
         type="string"
       />
      <property
         column="anio_normas"
         name="AnioNormas"
         not-null="false"
         type="string"
       />
      <property
         column="mercado_destino"
         name="MercadoDestino"
         not-null="false"
         type="string"
       />
      <property
         column="produccion"
         name="Produccion"
         not-null="false"
         type="string"
       />
      <property
         column="tecnologia_nom"
         name="TecnologiaNom"
         not-null="false"
         type="string"
       />
      <property
         column="email"
         name="Email"
         not-null="false"
         type="string"
       />
      <property
         column="direccion"
         name="Direccion"
         not-null="false"
         type="string"
       />
      <property
         column="investigacion_monto"
         length="8"
         name="InvestigacionMonto"
         not-null="false"
         type="java.lang.Float"
       />
      <property
         column="ciudad"
         name="Ciudad"
         not-null="false"
         type="string"
       />
      <property
         column="anio_en_proceso"
         name="AnioEnProceso"
         not-null="false"
         type="string"
       />
      <property
         column="licencia"
         length="1"
         name="Licencia"
         not-null="false"
         type="boolean"
       />
      <property
         column="comienzo_exportacion"
         name="ComienzoExportacion"
         not-null="false"
         type="string"
       />
      <property
         column="observacion_exportacion"
         name="ObservacionExportacion"
         not-null="false"
         type="string"
       />
      <property
         column="ef_comentario"
         name="EfComentario"
         not-null="false"
         type="string"
       />

      <many-to-one
         class="Financiado"
         name="Financiado1"
                        cascade="all"
         not-null="false"
      >
         <column name="financiado1" />
      </many-to-one>
      <many-to-one
         class="Financiado"
         name="Financiado0"
                        cascade="all"
         not-null="false"
      >
         <column name="financiado0" />
      </many-to-one>
      <many-to-one
         class="FormaJuridica"
         name="FormaJuridica"
         not-null="true"
      >
         <column name="forma_juridica_id" />
      </many-to-one>
      <many-to-one
         class="Departamento"
         name="Departamento"
         not-null="true"
      >
         <column name="departamento_id" />
      </many-to-one>
      <many-to-one
         class="ReprLegal"
         name="ReprLegal"
                        cascade="all"
         not-null="true"
      >
         <column name="repr_legal_id" />
      </many-to-one>
      <many-to-one
         class="Contacto"
         name="Contacto"
                        cascade="all"
         not-null="true"
      >
         <column name="contacto_id" />
      </many-to-one>
      <set
         cascade="delete"
         name="ExportacionSet"
         table="pyme_exportacion"
      >
         <key column="empresa_id" />
         <many-to-many class="Exportacion" column="exportacion_id" />
      </set>
      <set
         cascade="delete"
         name="CantidadEmpSet"
         table="pyme_cantidad_emp"
      >
         <key column="empresa_id" />
         <many-to-many class="CantidadEmp" column="cantidad_emp_id" />
      </set>
      <set
         cascade="save-update"
         name="PlanSet"
         table="pyme_plan"
      >
         <key column="empresa_id" />
         <many-to-many class="Plan" column="plan_id" />
      </set>
      <set
         cascade="all"
         name="DocumentoPresentadoSet"
         table="pyme_documento_presentado"
      >
         <key column="empresa_id" />
         <many-to-many class="DocumentoPresentado" column="documento_presentado_id" />
      </set>
      <set
         cascade="all"
         name="MercadoSet"
         table="pyme_mercado"
      >
         <key column="empresa_id" />
         <many-to-many class="Mercado" column="mercado_id" />
      </set>
      <set
         cascade="delete"
         name="InversionSet"
         table="pyme_inversion"
      >
         <key column="empresa_id" />
         <many-to-many class="Inversion" column="inversion_id" />
      </set>
      <set
         cascade="none"
         name="MercadoLocalSet"
         table="pyme_mercado_local"
      >
         <key column="empresa_id" />
         <many-to-many class="Departamento" column="departamento_id" />
      </set>
   </class>
</hibernate-mapping>


Code:
<hibernate-mapping package="pait">
   <class name="SolicitudReembolso" table="solicitud_reembolso">
      <id
         column="solicitud_reembolso_id"
         name="Id"
         type="java.lang.Long"
      >
         <generator class="net.sf.hibernate.id.IncrementGenerator" />
      </id>
      <property
         column="fecha_ingreso"
         length="4"
         name="FechaIngreso"
         not-null="false"
         type="date"
       />
      <property
         column="empresa_id"
         length="8"
         name="EmpresaId"
         not-null="false"
         type="java.lang.Long"
       />
                 <property
         column="pagado"
         name="Pagado"
         not-null="false"
         type="string"
       />
                 <!--property
         column="pagado"
         length="1"
         name="Pagado"
         not-null="false"
         type="boolean"
       /-->
                <many-to-one
         class="SolicitudCompra"
         name="SolicitudCompra"
         not-null="true"
      >
         <column name="solicitud_compra_id" />
      </many-to-one>
      <many-to-one
         class="Plan"
         name="Plan"
         not-null="true"
      >
         <column name="plan_id" />
      </many-to-one>
      <set inverse="true" name="ObservacionReembolsoSet">
         <key column="solicitud_reembolso_id" />
         <one-to-many class="ObservacionReembolso" />
      </set>
      <set inverse="true" name="EvaluacionReembolsoSet">
         <key column="solicitud_reembolso_id" />
         <one-to-many class="EvaluacionReembolso" />
      </set>
      <set inverse="true" name="DetalleReembolsoSet">
         <key column="solicitud_reembolso_id" />
         <one-to-many class="DetalleReembolso" />
      </set>
   </class>
</hibernate-mapping>


Code:
<hibernate-mapping package="pait">
   <class name="DetalleReembolso" table="detalle_reembolso">
      <id
         column="detalle_reembolso_id"
         name="Id"
         type="java.lang.Long"
      >
         <generator class="net.sf.hibernate.id.IncrementGenerator" />
      </id>
      <property
         column="nro_cheque"
         name="NroCheque"
         not-null="false"
         type="string"
       />
      <property
         column="cheque"
         length="1"
         name="Cheque"
         not-null="false"
         type="boolean"
       />
      <property
         column="banco"
         name="Banco"
         not-null="false"
         type="string"
       />
      <property
         column="fecha"
         length="4"
         name="Fecha"
         not-null="false"
         type="date"
       />
      <property
         column="tarjeta"
         length="1"
         name="Tarjeta"
         not-null="false"
         type="boolean"
       />
      <property
         column="comentario"
         name="Comentario"
         not-null="false"
         type="string"
       />
      <property
         column="monto_otorgado"
         length="8"
         name="MontoOtorgado"
         not-null="false"
         type="java.lang.Float"
       />
      <property
         column="efectivo"
         length="1"
         name="Efectivo"
         not-null="false"
         type="boolean"
       />
      <property
         column="nro_factura"
         name="NroFactura"
         not-null="false"
         type="string"
       />

      <many-to-one
         class="Actividad"
         name="Actividad"
         not-null="true"
      >
         <column name="actividad_id" />
      </many-to-one>
      <many-to-one
         class="SolicitudReembolso"
         name="SolicitudReembolso"
         not-null="true"
      >
         <column name="solicitud_reembolso_id" />
      </many-to-one>
      <many-to-one
         class="CambioMonetario"
         name="CambioMonetario"
         not-null="true"
      >
         <column name="cambio_monetario_id" />
      </many-to-one>
   </class>
</hibernate-mapping>


And here is the code executed before the last time the error happened:

Code:
_RootDAO.initialize();

SolicitudReembolsoDAO solReembolsoDAO = new SolicitudReembolsoDAO();
SolicitudReembolso solReembolso;
PlanDAO planDAO = new PlanDAO();
DetalleReembolsoDAO detReembolsoDAO = new DetalleReembolsoDAO();

if (request.getParameter("id") == null) {
   solReembolso = new SolicitudReembolso();
   solReembolso.setPlan(planDAO.load(new Long(request
         .getParameter("plan"))));
} else {
   solReembolso = solReembolsoDAO.load(new Long(request
         .getParameter("id")));
}

// I put a copy of the set in session.
session.setAttribute("detalles", new HashSet(solReembolso
   .getDetalleReembolsoSet()));

// I edit de set (add and remove items) and then......

Set detalles = (Set) session.getAttribute("detalles");

DetalleReembolso detReembolso;
Iterator i = solReembolso.getDetalleReembolsoSet()
   .iterator();
while (i.hasNext()) {
   detReembolso = (DetalleReembolso) i.next();
   if (!detalles.contains(detReembolso)) {
      detReembolsoDAO.delete(detReembolso);
         i.remove();
   }
}

solReembolsoDAO.saveOrUpdate(solReembolso);
i = detalles.iterator();
while (i.hasNext()) {
   detReembolso = (DetalleReembolso) i.next();
   detReembolso.setSolicitudReembolso(solReembolso);
   if (!solReembolso.getDetalleReembolsoSet().contains(
         detReembolso)) {
      solReembolso.addToDetalleReembolsoSet(detReembolso);
   }
   detReembolsoDAO.saveOrUpdate(detReembolso);
}

session.removeAttribute("detalles");


Well, I hope that it could help to find the error.
I really thank your help.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 9:32 am 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
1)Read hibenate docs. Hibenate send sql in flush operation,not in every delete, etc.
2) check if cascade="all" is you trouble.
3) Use the log of hibernate.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 10:37 am 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
I started logging hibernate sql into a file after last time error happened, but it did not happen again. I'm waiting, but I prefer to fix it before it happen again.
I do all operations with DAO classes, (generated with Hibernate Synchronizer), so delete, update, save, etc .... are all made within a transaction. And Transaction.commit() forces session.flush().

I think it happen because I do the hibernate work of saving the relations between the objects, when I started the project I use to replace the Set that hibernate loaded with a single HasSet, so the relations wasn't saved, but then I realize hibernate uses his own implementation of Set.
I'm trying to fix that.


Code:
        Collection empleados = (Collection) session.getAttribute("empleados");
        CantidadEmpDAO ceDao = new CantidadEmpDAO();
        CantidadEmp cantidadEmp;
        PymeCantidadEmpDAO pceDao = new PymeCantidadEmpDAO();
        Iterator i = pyme.getCantidadEmpSet().iterator();
        while(i.hasNext()){
            cantidadEmp = (CantidadEmp) i.next();
            if(!empleados.contains(cantidadEmp)){
                pceDao.delete(new PymeCantidadEmp(cantidadEmp, pyme));
                ceDao.delete(cantidadEmp);
                i.remove();
            }
        }
        i = empleados.iterator();
        while(i.hasNext()){
            cantidadEmp = (CantidadEmp) i.next();
            if(!pyme.getCantidadEmpSet().contains(cantidadEmp)){
                ceDao.save(cantidadEmp);
                pyme.addToCantidadEmpSet(cantidadEmp);
            }
        }


I'm pulling this out and I'll edit the Set that hibernate loads, so he keep trace of the changes I made and updates the database.

please tell me what you think.

Thank you so much[/b]


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 11:53 am 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
general rules of collectios.
1) Not use your proper implementations of collections. Hibernate discard this in runtime.
2) is good: use add,remove methods and hide your collectios .
3)is bad: public access for your collections
4) add/remove Objects in your collections, not change collections objects
( not use
Code:
public void setc(Collection c){ this.c=c;}


use
Code:
public void setc(Collection c){ this.c.add(c);}

)


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 12:07 pm 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
Thanks, I'm changing the code where I replace the collection, I'm doing that the app adds and removes items directly in the collection provided by hibernet.
I hope it be the error.
Thanks again.


Top
 Profile  
 
 Post subject: it happened again!
PostPosted: Mon May 30, 2005 2:52 pm 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
Hibernate deleted a lot of rows from the many-to-many tables again, but no action told him do that.
I found a common pattern present in all times that error happened.
Just before the request the tomcat session has been terminated because of the inactive time.
Has it any relation with the error? something about the cache? I don't know. Please help me.

hibernate logs:
11:34:44,919 DEBUG SQL:230 - select this.usuario_id as usuario_id1_, this.nombre as nombre1_, this.nombre_completo as nombre_c3_1_, this.clave as clave1_, this.email as email1_, this.telefono as telefono1_, this.rol_id as rol_id1_, rol1_.rol_id as rol_id0_, rol1_.descripcion as descripc2_0_ from usuario this left outer join rol rol1_ on this.rol_id=rol1_.rol_id where 1=1
11:34:44,928 DEBUG SQL:230 - select usuario0_.usuario_id as usuario_id1_, usuario0_.nombre as nombre1_, usuario0_.nombre_completo as nombre_c3_1_, usuario0_.clave as clave1_, usuario0_.email as email1_, usuario0_.telefono as telefono1_, usuario0_.rol_id as rol_id1_, rol1_.rol_id as rol_id0_, rol1_.descripcion as descripc2_0_ from usuario usuario0_ left outer join rol rol1_ on usuario0_.rol_id=rol1_.rol_id where usuario0_.usuario_id=?
11:34:44,932 DEBUG SQL:230 - insert into evento (fecha, descripcion, tipo, hora, usuario_id, evento_id) values (?, ?, ?, ?, ?, ?)
11:34:45,094 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,097 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,099 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,101 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,103 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,105 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,106 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,108 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,110 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,123 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,126 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,129 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,131 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,133 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,139 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,141 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,143 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,151 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,154 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,157 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,160 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,163 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,167 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,170 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,173 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,176 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,179 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,182 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,185 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,188 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,193 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,198 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,251 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,255 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:45,260 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,263 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,266 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:45,269 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,272 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,274 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,276 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,277 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,279 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,281 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,282 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,284 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,292 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,295 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,298 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,302 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,304 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,306 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,311 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,314 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,317 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,320 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,322 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,323 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,329 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,332 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,335 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,338 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,341 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,344 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,347 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,351 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,354 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,355 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,357 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,363 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,366 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,369 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,372 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,375 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,378 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,380 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,381 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,387 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,390 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,393 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,396 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,399 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,402 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,405 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,408 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,411 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,414 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,417 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,419 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,423 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,425 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,429 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,431 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,435 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,438 DEBUG SQL:230 - delete from pyme_exportacion where empresa_id=?
11:34:45,440 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,443 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,492 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:45,495 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,498 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,504 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:45,507 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:45,509 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,512 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,515 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,521 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:45,524 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:45,526 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,529 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,532 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,538 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:45,541 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:45,544 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,546 DEBUG SQL:230 - delete from pyme_exportacion where empresa_id=?
11:34:45,549 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:45,552 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:45,558 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:45,561 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:45,563 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:45,566 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:45,569 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,571 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,572 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,574 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,579 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,635 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,638 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,641 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,644 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,647 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,649 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,650 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,656 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,659 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,662 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,665 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,667 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,670 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,673 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,676 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,678 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,682 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,689 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,691 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,695 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,698 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,701 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,704 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,706 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,710 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,713 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,716 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,719 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,722 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,725 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:45,728 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,730 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,732 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,734 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,736 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,737 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,739 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,741 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,742 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,744 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,745 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,747 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,749 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,750 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,752 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,754 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,772 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,774 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,776 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,777 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,779 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,781 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,782 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,792 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,795 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,798 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,801 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,803 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,805 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,806 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,808 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,814 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,817 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,819 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,823 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,826 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,829 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,832 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,835 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,838 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,841 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,844 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,847 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,851 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,854 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,857 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,860 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,863 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,866 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,869 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,872 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,874 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,875 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,877 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,879 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,885 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,888 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,891 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,894 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,897 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,900 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,902 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,905 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:45,908 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,910 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,911 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,913 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,915 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,916 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,918 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,920 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:45,926 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,928 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,930 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,932 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,933 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,935 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,937 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,938 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,949 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,952 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,955 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,958 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,962 DEBUG SQL:230 - delete from informe_actividades where actividad_id=?
11:34:45,964 DEBUG SQL:230 - delete from informe_actividades where informe_id=?
11:34:45,967 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,970 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,973 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,976 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,979 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,983 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:45,985 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:45,988 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:45,991 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:45,994 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:45,996 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,001 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,004 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,007 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,010 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,013 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,016 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,019 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,022 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,024 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,026 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,030 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,033 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,036 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,039 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:46,042 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,045 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,048 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,052 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,055 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:46,057 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,061 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,062 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,064 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,066 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,071 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,074 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,077 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,084 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,087 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,090 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,093 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,095 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,096 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,102 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,105 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,108 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,111 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,114 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,117 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,120 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:46,123 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,124 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,126 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,128 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,129 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,131 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,137 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,140 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,143 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,148 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,151 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,153 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,155 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,160 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,163 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,166 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,169 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,173 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,176 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,179 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,181 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,183 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,185 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,187 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,188 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,196 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,199 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:46,201 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,204 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,208 DEBUG SQL:230 - delete from proveedor_cantidad_emp where empresa_id=?
11:34:46,210 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,214 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,217 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,220 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,223 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,225 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,229 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,232 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,234 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,238 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,241 DEBUG SQL:230 - delete from pyme_plan where plan_id=?
11:34:46,288 DEBUG SQL:230 - delete from pyme_exportacion where empresa_id=?
11:34:46,291 DEBUG SQL:230 - delete from pyme_cantidad_emp where empresa_id=?
11:34:46,293 DEBUG SQL:230 - delete from pyme_plan where empresa_id=?
11:34:46,296 DEBUG SQL:230 - delete from pyme_documento_presentado where empresa_id=?
11:34:46,299 DEBUG SQL:230 - delete from pyme_inversion where empresa_id=?
11:34:46,302 DEBUG SQL:230 - delete from pyme_mercado_local where empresa_id=?
11:34:46,305 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,307 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,308 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,311 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,313 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,315 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where solicitud_compra_id=?
11:34:46,320 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,324 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,327 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,330 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,332 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,336 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,339 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,340 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,342 DEBUG SQL:230 - delete from actividad_servicio where actividad_id=?
11:34:46,347 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,350 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,353 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,357 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,360 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,361 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,363 DEBUG SQL:230 - delete from proveedor_servicio where servicio_id=?
11:34:46,367 DEBUG SQL:230 - delete from proveedor_servicio where empresa_id=?
11:34:46,370 DEBUG SQL:230 - delete from autorizacion_pago_solicitud_compra where autorizacion_pago_id=?
11:34:46,472 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,474 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,481 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,484 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,487 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,489 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,492 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,496 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,499 DEBUG SQL:230 - insert into actividad_servicio (actividad_id, servicio_id) values (?, ?)
11:34:46,508 DEBUG SQL:230 - insert into proveedor_servicio (servicio_id, empresa_id) values (?, ?)
11:34:46,512 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)
11:34:46,515 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)
11:34:46,518 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)
11:34:46,520 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)
11:34:46,522 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)
11:34:46,525 DEBUG SQL:230 - insert into proveedor_servicio (empresa_id, servicio_id) values (?, ?)

and here is the DAO root class:
Code:
public abstract class _BaseRootDAO {
   
    protected static Map sessionFactoryMap = new HashMap();
    protected static ThreadLocal threadedSessions = new ThreadLocal();
   
    /**
     * Configure the session factory by reading hibernate config file
     */
    public static void initialize() throws HibernateException {
        initialize((String) null);
    }
   
    /**
     * Configure the session factory by reading hibernate config file
     * @param configFileName the name of the configuration file
     */
    public static void initialize(String configFileName) throws HibernateException {
        if (null == configFileName && sessionFactoryMap.size() > 0) return;
        else if (null != sessionFactoryMap.get(configFileName)) return;
        else {
            Configuration cfg = new Configuration();
            if (null == configFileName)
                cfg.configure();
            else
                cfg.configure(configFileName);
            setSessionFactory(configFileName, cfg.buildSessionFactory());
        }
    }
   
    /**
     * Set the session factory
     */
    protected static void setSessionFactory(SessionFactory sessionFactory) {
        setSessionFactory((String) null, sessionFactory);
    }
   
    /**
     * Set the session factory
     */
    protected static void setSessionFactory(String configFileName, SessionFactory sessionFactory) {
        sessionFactoryMap.put(configFileName, sessionFactory);
    }
   
    /**
     * Return the SessionFactory that is to be used by these DAOs.  Change this
     * and implement your own strategy if you, for example, want to pull the SessionFactory
     * from the JNDI tree.
     */
    protected SessionFactory getSessionFactory() throws HibernateException {
        return getSessionFactory(getConfigurationFileName());
    }
   
    private static SessionFactory getSessionFactory(String configFile) throws HibernateException {
        if (sessionFactoryMap.size() == 1) return (SessionFactory) sessionFactoryMap.values().toArray()[0];
        else {
            SessionFactory sessionFactory = (SessionFactory) sessionFactoryMap.get(configFile);
            if (null == sessionFactory)
                if (null == configFile)
                    throw new RuntimeException("The session factory has not been initialized.");
                else
                    throw new RuntimeException("The session factory for '" + configFile + "' has not been initialized.");
            else
                return sessionFactory;
        }
    }
   
    /**
     * Return a new Session object that must be closed when the work has been completed.
     * @return the active Session
     */
    protected Session getSession() throws HibernateException {
        return createSession();
    }
   
    /**
     * Return a new Session object that must be closed when the work has been completed.
     * @return the active Session
     */
    public static Session createSession() throws HibernateException {
        return createSession(null);
    }
   
    /**
     * Return a new Session object that must be closed when the work has been completed.
     * @param configFile the config file must match the meta attribute "config-file" in the hibernate mapping file
     * @return the active Session
     */
    public static Session createSession(String configFile) throws HibernateException {
        java.util.Stack sessionStack = (java.util.Stack) threadedSessions.get();
        Session session = null;
        if (null == sessionStack) {
            sessionStack = new java.util.Stack();
            threadedSessions.set(sessionStack);
        }
        if (sessionStack.size() > 0) {
            Object[] arr = (Object[]) sessionStack.peek();
            String cf = (String) arr[0];
            if (null == cf) {
                session = (Session) arr[1];
            }
            else if (null != cf && null != configFile) {
                if (cf.equals(configFile)) session = (Session) arr[1];
            }
            if (null == session) {
                session = getSessionFactory(configFile).openSession();
                arr = new Object[2];
                arr[0] = configFile;
                arr[1] = session;
                sessionStack.push(arr);
            }
        }
        else {
            session = getSessionFactory(configFile).openSession();
            Object[] arr = new Object[2];
            arr = new Object[2];
            arr[0] = configFile;
            arr[1] = session;
            sessionStack.push(arr);
        }
        return session;
    }
   
    /**
     * Return the name of the configuration file to be used with this DAO or null if default
     */
    public String getConfigurationFileName() {
        return null;
    }
   
    /**
     * Return the specific Object class that will be used for class-specific
     * implementation of this DAO.
     * @return the reference Class
     */
    public abstract Class getReferenceClass();
   
    /**
     * Close the session
     */
    public void closeSession() throws HibernateException {
        java.util.Stack sessionStack = (java.util.Stack) threadedSessions.get();
        if (null != sessionStack) {
            Object[] arr = (Object[]) sessionStack.peek();
            String cf = (String) arr[0];
            if (null == cf) {
                Session session = (Session) arr[1];
                session.close();
                sessionStack.pop();
            }
            else {
                String configurationFile = getConfigurationFileName();
                if (null != configurationFile && configurationFile.equals(cf)) {
                    Session session = (Session) arr[1];
                    session.close();
                    sessionStack.pop();
                }
            }
        }
    }
   
    /**
     * Begin the transaction related to the session
     */
    public Transaction beginTransaction(Session s) throws HibernateException {
        return s.beginTransaction();
    }
   
    /**
     * Commit the given transaction
     */
    public void commitTransaction(Transaction t) throws HibernateException {
        t.commit();
    }
   
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * @param name the name of a query defined externally
     * @return Query
     */
    public List getNamedQuery(String name) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return getNamedQuery(name, s);
        } finally {
            closeSession();
        }
    }
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * Use the session given.
     * @param name the name of a query defined externally
     * @param s the Session
     * @return Query
     */
    public List getNamedQuery(String name, Session s) throws HibernateException {
        Query q = s.getNamedQuery(name);
        return q.list();
    }
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * Use the parameters given.
     * @param name the name of a query defined externally
     * @param params the parameter array
     * @return Query
     */
    public List getNamedQuery(String name, Serializable[] params)
    throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return getNamedQuery(name, params, s);
        } finally {
            closeSession();
        }
    }
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * Use the parameters given and the Session given.
     * @param name the name of a query defined externally
     * @param params the parameter array
     * @s the Session
     * @return Query
     */
    public List getNamedQuery(String name, Serializable[] params, Session s)
    throws HibernateException {
        Query q = s.getNamedQuery(name);
        if (null != params) {
            for (int i = 0; i < params.length; i++) {
                setParameterValue(q, i, params[i]);
            }
        }
        return q.list();
    }
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * Use the parameters given.
     * @param name the name of a query defined externally
     * @param params the parameter Map
     * @return Query
     */
    public List getNamedQuery(String name, Map params)
    throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return getNamedQuery(name, params, s);
        } finally {
            closeSession();
        }
    }
   
    /**
     * Obtain an instance of Query for a named query string defined in the mapping file.
     * Use the parameters given and the Session given.
     * @param name the name of a query defined externally
     * @param params the parameter Map
     * @s the Session
     * @return Query
     */
    public List getNamedQuery(String name, Map params, Session s)
    throws HibernateException {
        Query q = s.getNamedQuery(name);
        if (null != params) {
            for (Iterator i=params.entrySet().iterator(); i.hasNext(); ) {
                Map.Entry entry = (Map.Entry) i.next();
                setParameterValue(q, (String) entry.getKey(), entry.getValue());
            }
        }
        return q.list();
    }
   
   
    /**
     * Return a Criteria object that relates to the DAO's table.
     * A session will be created if an open one is not located.  This session must be closed!
     */
    public Criteria createCriteria() throws HibernateException {
        Session s = getSession();
        return createCriteria(s);
    }
   
    /**
     * Return a Criteria object that relates to the DAO's table
     */
    public Criteria createCriteria(Session s) throws HibernateException {
        return s.createCriteria(getReferenceClass());
    }
   
    /**
     * Return the property of the class you would like to use for default ordering
     * @return the property name
     */
   
    /**
     * Convenience method to set paramers in the query given based on the actual object type in passed in as the value.
     * You may need to add more functionaly to this as desired (or not use this at all).
     * @param query the Query to set
     * @param position the ordinal position of the current parameter within the query
     * @param value the object to set as the parameter
     */
    public void setParameterValue(Query query, int position, Object value) {
        if (null == value) {
            return;
        } else if (value instanceof Boolean) {
            query.setBoolean(position, ((Boolean) value).booleanValue());
        } else if (value instanceof String) {
            query.setString(position, (String) value);
        } else if (value instanceof Integer) {
            query.setInteger(position, ((Integer) value).intValue());
        } else if (value instanceof Long) {
            query.setLong(position, ((Long) value).longValue());
        } else if (value instanceof Float) {
            query.setFloat(position, ((Float) value).floatValue());
        } else if (value instanceof Double) {
            query.setDouble(position, ((Double) value).doubleValue());
        } else if (value instanceof BigDecimal) {
            query.setBigDecimal(position, (BigDecimal) value);
        } else if (value instanceof Byte) {
            query.setByte(position, ((Byte) value).byteValue());
        } else if (value instanceof Calendar) {
            query.setCalendar(position, (Calendar) value);
        } else if (value instanceof Character) {
            query.setCharacter(position, ((Character) value).charValue());
        } else if (value instanceof Timestamp) {
            query.setTimestamp(position, (Timestamp) value);
        } else if (value instanceof Date) {
            query.setDate(position, (Date) value);
        } else if (value instanceof Short) {
            query.setShort(position, ((Short) value).shortValue());
        }
    }
   
    /**
     * Convenience method to set paramers in the query given based on the actual object type in passed in as the value.
     * You may need to add more functionaly to this as desired (or not use this at all).
     * @param query the Query to set
     * @param key the key name
     * @param value the object to set as the parameter
     */
    public void setParameterValue(Query query, String key, Object value) {
        if (null == key || null == value) {
            return;
        } else if (value instanceof Boolean) {
            query.setBoolean(key, ((Boolean) value).booleanValue());
        } else if (value instanceof String) {
            query.setString(key, (String) value);
        } else if (value instanceof Integer) {
            query.setInteger(key, ((Integer) value).intValue());
        } else if (value instanceof Long) {
            query.setLong(key, ((Long) value).longValue());
        } else if (value instanceof Float) {
            query.setFloat(key, ((Float) value).floatValue());
        } else if (value instanceof Double) {
            query.setDouble(key, ((Double) value).doubleValue());
        } else if (value instanceof BigDecimal) {
            query.setBigDecimal(key, (BigDecimal) value);
        } else if (value instanceof Byte) {
            query.setByte(key, ((Byte) value).byteValue());
        } else if (value instanceof Calendar) {
            query.setCalendar(key, (Calendar) value);
        } else if (value instanceof Character) {
            query.setCharacter(key, ((Character) value).charValue());
        } else if (value instanceof Timestamp) {
            query.setTimestamp(key, (Timestamp) value);
        } else if (value instanceof Date) {
            query.setDate(key, (Date) value);
        } else if (value instanceof Short) {
            query.setShort(key, ((Short) value).shortValue());
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Load object matching the given key and return it.
     */
    public Object load(Class refClass, Serializable key) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return load(refClass, key, s);
        } finally {
            closeSession();
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Load object matching the given key and return it.
     */
    public Object load(Class refClass, Serializable key, Session s) throws HibernateException {
        return s.load(refClass, key);
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Persist the given transient instance, first assigning a generated identifier.
     * (Or using the current value of the identifier property if the assigned generator is used.)
     */
    public Serializable save(Object obj) throws HibernateException {
        Transaction t = null;
        Session s = null;
        try {
            s = getSession();
            t = beginTransaction(s);
            Serializable rtn = save(obj, s);
            commitTransaction(t);
            return rtn;
        }
        catch (HibernateException e) {
            if (null != t) t.rollback();
            throw e;
        }
        finally {
            closeSession();
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Persist the given transient instance, first assigning a generated identifier.
     * (Or using the current value of the identifier property if the assigned generator is used.)
     */
    public Serializable save(Object obj, Session s) throws HibernateException {
        return s.save(obj);
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Either save() or update() the given instance, depending upon the value of its
     * identifier property.
     */
    public void saveOrUpdate(Object obj) throws HibernateException {
        Transaction t = null;
        Session s = null;
        try {
            s = getSession();
            t = beginTransaction(s);
            saveOrUpdate(obj, s);
            commitTransaction(t);
        }
        catch (HibernateException e) {
            if (null != t) t.rollback();
            throw e;
        }
        finally {
            closeSession();
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Either save() or update() the given instance, depending upon the value of its
     * identifier property.
     */
    public void saveOrUpdate(Object obj, Session s) throws HibernateException {
        s.saveOrUpdate(obj);
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent
     * instance with the same identifier in the current session.
     * @param obj a transient instance containing updated state
     */
    public void update(Object obj) throws HibernateException {
        Transaction t = null;
        Session s = null;
        try {
            s = getSession();
            t = beginTransaction(s);
            update(obj, s);
            commitTransaction(t);
        }
        catch (HibernateException e) {
            if (null != t) t.rollback();
            throw e;
        }
        finally {
            closeSession();
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Update the persistent state associated with the given identifier. An exception is thrown if there is a persistent
     * instance with the same identifier in the current session.
     * @param obj a transient instance containing updated state
     * @param s the Session
     */
    public void update(Object obj, Session s) throws HibernateException {
        s.update(obj);
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
     * Session or a transient instance with an identifier associated with existing persistent state.
     */
    public void delete(Object obj) throws HibernateException {
        Transaction t = null;
        Session s = null;
        try {
            s = getSession();
            t = beginTransaction(s);
            delete(obj, s);
            commitTransaction(t);
        }
        catch (HibernateException e) {
            if (null != t) t.rollback();
            throw e;
        }
        finally {
            closeSession();
        }
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Remove a persistent instance from the datastore. The argument may be an instance associated with the receiving
     * Session or a transient instance with an identifier associated with existing persistent state.
     */
    public void delete(Object obj, Session s) throws HibernateException {
        s.delete(obj);
    }
   
    /**
     * Used by the base DAO classes but here for your modification
     * Re-read the state of the given instance from the underlying database. It is inadvisable to use this to implement
     * long-running sessions that span many business tasks. This method is, however, useful in certain special circumstances.
     */
    public void refresh(Object obj, Session s) throws HibernateException {
        s.refresh(obj);
    }
   
    /**Devuelve una lista desde una consulta de HQL*/
    public List find(String query) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return find(query, s);
        }
        finally {
            closeSession();
        }
    }
   
    /**Devuelve una lista desde una consulta de HQL en una sesión especificada.*/
    public List find(String query, Session s) throws HibernateException {
        return s.find(query);
    }
   
    /**Devuelve una lista de todos los objetos del tipo, sin filtro.*/
    public List findAll() throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return findAll(s);
        }
        finally {
            closeSession();
        }
    }
   
   
    //Devuelve todos los objetos del tipo, sin filtro en la sesión especificada.
   
    public List findAll(Session s) throws HibernateException {
        return findAll(s, null, true);
    }
   
   
    /**Devuelve todos los objetos del tipo sin filtro ordenados por propiedad.*/
    public List findAll(String orderProperty, boolean ascOrder) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return findAll(s, orderProperty, ascOrder);
        }
        finally {
            closeSession();
        }
    }
   
    /**Devuelve todos los objetos del tipo, en una sesión sin filtro ordenados por una propiedad.*/
    public List findAll(Session s, String orderProperty, boolean ascOrder) throws HibernateException {
        Criteria crit = createCriteria(s);
        if (null != orderProperty) crit.addOrder(Order.asc(orderProperty));
        return crit.list();
    }
   
    /**Devuelve una lista filtrada por una propiedad.*/
    public List filterBy(String propertyName, Object filter) throws HibernateException {
        return filterBy(propertyName, filter, null, true);
    }
   
    /**Devuelve una lista filtrada por una propiedad, ordenada por una propiedad en forma ascendente o descendente.*/
    public List filterBy(String propertyName, Object filter, String orderProperty, boolean ascOrder) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return filterBy(s, propertyName, filter, orderProperty, ascOrder);
        }
        finally {
            closeSession();
        }
    }
   
    public List filterBetween(String propertyName, Object filterBottom, Object filterTop, String orderProperty, boolean ascOrder) throws HibernateException {
        Session s = null;
        try{
            s = getSession();
            Criteria crit = createCriteria(s);
            crit.add(Expression.between(propertyName,filterBottom, filterTop));
            if (null != orderProperty)
            {
                if (ascOrder==true) 
                    crit.addOrder(Order.asc(orderProperty));
                else
                    crit.addOrder(Order.desc(orderProperty));
            }
            return crit.list();   
        }
        finally {
            closeSession();
        }
    }
   
    /**Devuelve una lista filtrada por una propiedad, ordenada por una propiedad, en una sesión especifica.*/
    public List filterBy(Session s, String propertyName, Object filter, String orderProperty, boolean ascOrder) throws HibernateException {
        Criteria crit = createCriteria(s);
        if (filter instanceof String)
            crit.add(Expression.like(propertyName,filter));
        else
            crit.add(Expression.eq(propertyName,filter));
        if (null != orderProperty)
        {
            if (ascOrder==true) 
                crit.addOrder(Order.asc(orderProperty));
            else
                crit.addOrder(Order.desc(orderProperty));
        }
        return crit.list();
    }
   
    public java.util.List find(String query, Object obj, Type type) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return find(query, obj, type, s);
        }
        finally {
            closeSession();
        }
    }
   
    public List find(String query, Object obj, Type type, Session s) throws HibernateException {
        return s.find(query, obj, type);
    }
   
    public List find(String query, Object[] obj, Type[] type) throws HibernateException {
        Session s = null;
        try {
            s = getSession();
            return find(query, obj, type, s);
        }
        finally {
            closeSession();
        }
    }
   
    public List find(String query, Object[] obj, Type[] type, Session s) throws HibernateException {
        return s.find(query, obj, type);
    }
   
}


and I have the next line in every jsp:

_RootDAO.initialize();


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 4:05 pm 
Regular
Regular

Joined: Tue May 24, 2005 10:19 am
Posts: 65
vry long this problem.... send -me personal email.


Top
 Profile  
 
 Post subject:
PostPosted: Mon May 30, 2005 4:18 pm 
Newbie

Joined: Sat May 28, 2005 1:10 am
Posts: 6
Location: Argentina
It is a very strange error. If you have any idea about what can I do, please write me to gmt@advansix.com or by msn to gmmstn@hotmail.com.
Thanks a lot again.


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