flushing entities between save and retrieving