File tree 1 file changed +2
-2
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -811,7 +811,7 @@ <T> Document getMappedQuery(@Nullable MongoPersistentEntity<T> domainType) {
811
811
812
812
Document mappedQuery = super .getMappedQuery (domainType );
813
813
814
- if (multi && update .isIsolated () && !mappedQuery .containsKey ("$isolated" )) {
814
+ if (multi && update != null && update .isIsolated () && !mappedQuery .containsKey ("$isolated" )) {
815
815
mappedQuery .put ("$isolated" , 1 );
816
816
}
817
817
@@ -907,7 +907,7 @@ void increaseVersionForUpdateIfNecessary(@Nullable MongoPersistentEntity<?> pers
907
907
if (persistentEntity != null && persistentEntity .hasVersionProperty ()) {
908
908
909
909
String versionFieldName = persistentEntity .getRequiredVersionProperty ().getFieldName ();
910
- if (!update .modifies (versionFieldName )) {
910
+ if (update != null && !update .modifies (versionFieldName )) {
911
911
update .inc (versionFieldName );
912
912
}
913
913
}
You can’t perform that action at this time.
0 commit comments