Fixed place where Repository::persistHasManyChanges is called