Fixing isUnique and extistsIn rules when updating entities