Due to this commit MongoDB.Driver 2.22.0 will call DocumentVersionService.DetermineVersion() with null passed as the instance parameter causing NullReferenceException. This will happen if linq3 query uses DefaultIfEmpty() clause. There is no easy way to workaround this, seems like null check is needed in MigrationInterceptor before it determines the version
Due to this commit MongoDB.Driver 2.22.0 will call
DocumentVersionService.DetermineVersion()withnullpassed as theinstanceparameter causingNullReferenceException. This will happen if linq3 query usesDefaultIfEmpty()clause. There is no easy way to workaround this, seems like null check is needed inMigrationInterceptorbefore it determines the version