log.trace("flushing session");
EventSource session = event.getSession();
final PersistenceContext persistenceContext = session.getPersistenceContext();
session.getInterceptor().preFlush( new LazyIterator( persistenceContext.getEntitiesByKey() ) );
prepareEntityFlushes(session);
// we could move this inside if we wanted to
// tolerate collection initializations during
// collection dirty checking: