File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core Expand file tree Collapse file tree 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) {
811811
812812 Document mappedQuery = super .getMappedQuery (domainType );
813813
814- if (multi && update .isIsolated () && !mappedQuery .containsKey ("$isolated" )) {
814+ if (multi && update != null && update .isIsolated () && !mappedQuery .containsKey ("$isolated" )) {
815815 mappedQuery .put ("$isolated" , 1 );
816816 }
817817
@@ -907,7 +907,7 @@ void increaseVersionForUpdateIfNecessary(@Nullable MongoPersistentEntity<?> pers
907907 if (persistentEntity != null && persistentEntity .hasVersionProperty ()) {
908908
909909 String versionFieldName = persistentEntity .getRequiredVersionProperty ().getFieldName ();
910- if (!update .modifies (versionFieldName )) {
910+ if (update != null && !update .modifies (versionFieldName )) {
911911 update .inc (versionFieldName );
912912 }
913913 }
You can’t perform that action at this time.
0 commit comments