Uploaded image for project: 'C# Driver'
  1. C# Driver
  2. CSHARP-4061

LINQ3 AggregateFluent.ToString() will not render GroupStageDefinition

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.15.0
    • Affects Version/s: None
    • Component/s: LINQ3
    • None

      Summary

      Even with LINQ3 configured, and with a working aggregate that contains a Group method, when calling AggregateFluent.ToString() while debugging, I get an InvalidOperationException with the message "GroupExpressStageDefinitions can only be used with LINQ3"

      Please provide the version of the driver. If applicable, please provide the MongoDB server version and topology (standalone, replica set, or sharded cluster).

      How to Reproduce

      Steps to reproduce. If possible, please include a Short, Self Contained, Correct (Compilable), Example.

      Additional Background

      Please provide any additional background information that may be helpful in diagnosing the bug.

      Stack trace.

      _

      _
       _at MongoDB.Driver.Linq.Linq3Implementation.GroupExpressionStageDefinitions`3.GroupStageDefinition.Render(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.AppendedStagePipelineDefinition`3.Render(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.AppendedStagePipelineDefinition`3.Render(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.AppendedStagePipelineDefinition`3.Render(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.AppendedStagePipelineDefinition`3.Render(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.PipelineDefinition`2.ToString(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry, LinqProvider linqProvider)_
       _at MongoDB.Driver.PipelineDefinition`2.ToString(IBsonSerializer`1 inputSerializer, IBsonSerializerRegistry serializerRegistry)_
       _at MongoDB.Driver.PipelineDefinition`2.ToString()_
       _at System.Text.ValueStringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)_
       _at System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)_
       _at System.String.Format(String format, Object arg0)_
       _at MongoDB.Driver.AggregateFluent`2.ToString()_
      _

      _

            Assignee:
            robert@mongodb.com Robert Stam
            Reporter:
            richard.collette@precisely.com Rich Collette
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: