problem of first entity not persisted handled