trying onFlush instead of postUpdate and postPersist