<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:37:08 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>MongoDB Jira</title>
    <link>https://jira.mongodb.org</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.7.1</version>
        <build-number>970001</build-number>
        <build-date>13-04-2023</build-date>
    </build-info>


<item>
            <title>[CSHARP-539] Support C# dynamic type</title>
                <link>https://jira.mongodb.org/browse/CSHARP-539</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;We have not yet determined in which version we might add support for C# dynamic types. This ticket is a place where you can comment on the desirability of the feature and/or vote for it.&lt;/p&gt;</description>
                <environment></environment>
        <key id="45245">CSHARP-539</key>
            <summary>Support C# dynamic type</summary>
                <type id="2" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14711&amp;avatarType=issuetype">New Feature</type>
                                            <priority id="3" iconUrl="https://jira.mongodb.org/images/icons/priorities/major.svg">Major - P3</priority>
                        <status id="6" iconUrl="https://jira.mongodb.org/images/icons/statuses/closed.png" description="The issue is considered finished, the resolution is correct. Issues which are closed can be reopened.">Closed</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="9">Done</resolution>
                                        <assignee username="robert@mongodb.com">Robert Stam</assignee>
                                    <reporter username="robert@mongodb.com">Robert Stam</reporter>
                        <labels>
                    </labels>
                <created>Tue, 24 Jul 2012 16:22:37 +0000</created>
                <updated>Mon, 26 Jan 2015 21:34:07 +0000</updated>
                            <resolved>Sat, 14 Jun 2014 21:41:42 +0000</resolved>
                                    <version>1.5</version>
                                    <fixVersion>2.0</fixVersion>
                                                        <votes>2</votes>
                                    <watches>5</watches>
                                                                                                                <comments>
                            <comment id="621581" author="rstam" created="Sat, 14 Jun 2014 21:41:09 +0000"  >&lt;p&gt;The changes made for &lt;a href=&quot;https://jira.mongodb.org/browse/CSHARP-933&quot; title=&quot;Improve IBsonSerializer design&quot; class=&quot;issue-link&quot; data-issue-key=&quot;CSHARP-933&quot;&gt;&lt;del&gt;CSHARP-933&lt;/del&gt;&lt;/a&gt; already included support for serializing C# dynamic types.&lt;/p&gt;</comment>
                            <comment id="497578" author="craiggwilson" created="Wed, 12 Feb 2014 03:25:14 +0000"  >&lt;p&gt;Github commit: &lt;a href=&quot;https://github.com/mongodb/mongo-csharp-driver/commit/a9b7afb7aa25d4e7e0bc29b4e7fc28d9688af9f0&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/mongodb/mongo-csharp-driver/commit/a9b7afb7aa25d4e7e0bc29b4e7fc28d9688af9f0&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="387912" author="mkennedy66996693" created="Wed, 24 Jul 2013 17:03:04 +0000"  >&lt;p&gt;That&apos;s perfect, thanks for the tentative update.&lt;/p&gt;</comment>
                            <comment id="387435" author="craiggwilson" created="Wed, 24 Jul 2013 00:07:44 +0000"  >&lt;p&gt;Probably towards the end of year, likely in conjunction with server 2.6.  Not set in stone and won&apos;t release it until it&apos;s ready.&lt;/p&gt;</comment>
                            <comment id="387382" author="mkennedy66996693" created="Tue, 23 Jul 2013 22:34:22 +0000"  >&lt;p&gt;Great, thanks Craig. Any time frame for the release of v2.0?&lt;/p&gt;</comment>
                            <comment id="387337" author="craiggwilson" created="Tue, 23 Jul 2013 21:40:20 +0000"  >&lt;p&gt;Yep, version 2.0 of the driver will have full support for dynamic objects, regardless of if they are expando or not as long as they implement IDynamicMetaObjectProvider.  It may require the use of a special collection (i.e. db.GetDynamicCollection()), but we&apos;ll see when we implement it.  You can see a spike for support here: &lt;a href=&quot;https://github.com/craiggwilson/mongo-csharp-driver/tree/dynamic/Bson.Dynamic&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/craiggwilson/mongo-csharp-driver/tree/dynamic/Bson.Dynamic&lt;/a&gt;.  This was done a long time ago, but proves the point.&lt;/p&gt;</comment>
                            <comment id="387332" author="mkennedy66996693" created="Tue, 23 Jul 2013 21:35:57 +0000"  >&lt;p&gt;Hi, I&apos;d like to add some thoughts. It would be nice if you could &lt;b&gt;save&lt;/b&gt; dynamic objects and similarly load them back (as ExpandoObjects). Here&apos;s some code I would expect to work which does &lt;b&gt;not&lt;/b&gt; currently (error is &quot;to save a doc, it must have an id&quot;).&lt;/p&gt;

&lt;p&gt;        var ctx = new MongoDbDataContext();&lt;/p&gt;

&lt;p&gt;	dynamic dyn = new ExpandoObject();&lt;br/&gt;
	dyn._id = ObjectId.GenerateNewId();&lt;br/&gt;
	dyn.Name = &quot;Pierre&quot;;&lt;br/&gt;
	dyn.Age = 39;&lt;/p&gt;

&lt;p&gt;	WriteConcernResult writeConcern = ctx.Db.GetCollection(&quot;tester&quot;).Save(dyn);&lt;br/&gt;
            if (!writeConcern.Ok)&lt;br/&gt;
                throw new ApplicationException(writeConcern.ErrorMessage);&lt;br/&gt;
	else&lt;br/&gt;
		Console.WriteLine (&quot;Save successful&quot;);&lt;/p&gt;

&lt;p&gt;I think the actual problem is simply that the way properties are retrieved using reflection doesn&apos;t work for ExpandoObjects. But there is a simple alternative if the object is that type.&lt;/p&gt;

&lt;p&gt;Cheers,&lt;br/&gt;
Michael&lt;/p&gt;</comment>
                            <comment id="308501" author="maxbl4" created="Mon, 8 Apr 2013 13:22:14 +0000"  >&lt;p&gt;After looking into it a bit more. I see, that this may have notable performance cost. So, if you should implement dynamic behavior, it should be opt-in, not default.&lt;br/&gt;
Something like a different set of methods &quot;FindAllDynamic&quot; etc.&lt;/p&gt;</comment>
                            <comment id="308495" author="maxbl4" created="Mon, 8 Apr 2013 13:14:44 +0000"  >&lt;p&gt;It would very convenient if BsonDocument implemented dynamic calls. So instead of doc&lt;span class=&quot;error&quot;&gt;&amp;#91;&amp;quot;SomeProp&amp;quot;&amp;#93;&lt;/span&gt; you could write doc.SomeProp. Basically it should require a very simple wrapper over normal dictionary based workflow.&lt;/p&gt;</comment>
                            <comment id="164961" author="craiggwilson" created="Mon, 17 Sep 2012 13:07:04 +0000"  >&lt;p&gt;Check this here: &lt;a href=&quot;http://huddledmasses.org/powershell-3-finally-on-the-dlr/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://huddledmasses.org/powershell-3-finally-on-the-dlr/&lt;/a&gt;.  Essentially, powershell now runs on the DLR which means that it will natively use the dynamic support we build into the driver.  Hence, us using dynamic will make it much simpler to use with powershell across the board.  The real trick is to figure out how to expose the dynamic functionality.  For instance, MongoCollection&amp;lt;dynamic&amp;gt; would be nice.  Except we don&apos;t know it&apos;s &quot;dynamic&quot; at runtime.  All we see is &quot;object&quot;.&lt;/p&gt;</comment>
                            <comment id="164871" author="zippy1981" created="Mon, 17 Sep 2012 02:16:36 +0000"  >&lt;p&gt;I&apos;ve never done dynamic in C#, but a PSObject/PSCustomObject in powershell is a dynamic object. Also if you add NoteProperties to an object, it wraps that object in a PSObject. Therefore this has powershell implications.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10012">
                    <name>Related</name>
                                            <outwardlinks description="related to">
                                        <issuelink>
            <issuekey id="123062">CSHARP-933</issuekey>
        </issuelink>
                            </outwardlinks>
                                                        </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_15850" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    <customfield id="customfield_12550" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2|hrfdlr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2077</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                    <customfield id="customfield_10557" key="com.pyxis.greenhopper.jira:gh-sprint">
                        <customfieldname>Sprint</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue id="131">Sprint 2</customfieldvalue>
    <customfieldvalue id="182">Sprint 3 - May 25 - High Level</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>