Index: topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java diff -u topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.15 topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.16 --- topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java:1.15 Fri Feb 24 00:51:04 2006 +++ topia2/src/java/org/codelutin/topia/framework/TopiaContextImpl.java Tue Feb 28 23:49:40 2006 @@ -23,9 +23,9 @@ * * @author poussin * - * @version $Revision: 1.15 $ + * @version $Revision: 1.16 $ * - * Last update: $Date: 2006/02/24 00:51:04 $ by : $Author: thimel $ + * Last update: $Date: 2006/02/28 23:49:40 $ by : $Author: bpoussin $ */ package org.codelutin.topia.framework; @@ -651,6 +651,10 @@ Transaction tx = hibernate.beginTransaction(); hibernate.flush(); tx.commit(); + // it's seem necessary to change session after commit + // NON, NON, NON, il ne faut surtout pas le faire, ca pose plein de probleme +// hibernate = getHibernateFactory().openSession(); +// hibernate.setFlushMode(FlushMode.NEVER); fireOnCommited(); } catch (HibernateException eee) { throw new TopiaException(eee); @@ -677,6 +681,7 @@ // it's very important to change the session after rollback // otherwize there are many error during next Entity's modification hibernate = getHibernateFactory().openSession(); + hibernate.setFlushMode(FlushMode.NEVER); fireOnRollbacked(); } catch (HibernateException eee) { throw new TopiaException(eee); @@ -889,7 +894,9 @@ } try { TopiaEntityLoadEvent event = new TopiaEntityLoadEvent(this, entity); - transactionEvents.add(new TopiaTransactionEvent(this, entityClass, id)); + // NON, NON, NON, il ne faut pas ajouter cette entity dans les events + // de transaction, c un load pas une modif :( +// transactionEvents.add(new TopiaTransactionEvent(this, entityClass, id)); for(Iterator l=getLoadListeners().iterator(entity.getClass()); l.hasNext();) { l.next().entityLoaded(event); }