Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version:
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:
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
I want to insert an objet in a database, but the database changes although I'm never committing the a transaction and I'm never flushing the session. It is a big problem...
public boolean vende(Venta venta) {
session = SessionAccess.getSession();
try{
Salida salida = new Salida(new java.util.GregorianCalendar() //fecha
, String.valueOf("25") //ultimoNumero
, false //procesado
, false //contabilidad
, null //observaciones
, null //cobro
, null //bodega
, null //tipoMovimiento
, null //tipoDocumento
, null //cliente
, null //detalles
, null); //empleado
session.saveOrUpdate(salida);
SessionAccess.closeSession();
}catch(HibernateException e){
Logger.getLogger(this.getClass()).error("Error al realizar la venta: ", e);
return false;
}catch(Exception e){
;
}
SessionAccess.closeSession();
return true;
}
please, help me.
Regards
Luis