Improve support for $set and $addFields

XMLWordPrintableJSON

    • Type: New Feature
    • Resolution: Unresolved
    • Priority: Unknown
    • None
    • Affects Version/s: 3.6.0
    • Component/s: Builders, LINQ
    • None
    • None
    • Dotnet Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      IAggregateFluent currently has a Set method that translates to $set that can be used to set existing fields to new values.

      We should consider adding a new overload that can be used to add new fields. Since the API is strongly typed this would require using a separate POCO (that includes the new fields) as the result type.

      While $set and $addFields are synonyms to the server, in our strongly typed API we might want to use Set to set existing fields and AddFields for adding new fields.

      We might also want to consider adding custom Set and AddFields LINQ extension methods to allow use of these stages in a LINQ query.

            Assignee:
            Unassigned
            Reporter:
            Robert Stam (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: