<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Wed Feb 07 21:42:50 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-2537] BsonDefaultValue attributes in properties is not working</title>
                <link>https://jira.mongodb.org/browse/CSHARP-2537</link>
                <project id="10041" key="CSHARP">C# Driver</project>
                    <description>&lt;p&gt;I tried added the BsonDefaultValue in datetime property, when I pass the that value it should take the value if it is null then it should take the default value of current datetime. It is not working for datetime even it&apos;s not working for string value also. Please help me on this.&lt;/p&gt;</description>
                <environment></environment>
        <key id="704524">CSHARP-2537</key>
            <summary>BsonDefaultValue attributes in properties is not working</summary>
                <type id="3" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14718&amp;avatarType=issuetype">Task</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="wan.bachtiar@mongodb.com">Wan Bachtiar</assignee>
                                    <reporter username="lawce">Lawrence</reporter>
                        <labels>
                            <label>question</label>
                            <label>rfw</label>
                    </labels>
                <created>Tue, 26 Feb 2019 11:30:35 +0000</created>
                <updated>Thu, 25 Jun 2020 02:28:11 +0000</updated>
                            <resolved>Thu, 25 Jun 2020 02:28:11 +0000</resolved>
                                                                                        <votes>1</votes>
                                    <watches>2</watches>
                                                                                                                <comments>
                            <comment id="3223189" author="rachelle.palmer" created="Thu, 25 Jun 2020 02:28:11 +0000"  >&lt;p&gt;Hi there, thank you for reaching out to MongoDB. As this sounds more like a support issue, I wanted to give you some resources to get this question answered more quickly:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;our MongoDB support portal, located at &lt;a href=&quot;https://support.mongodb.com/welcome&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;support.mongodb.com&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;our MongoDB community forums, located &lt;a href=&quot;https://developer.mongodb.com/community/forums/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;here&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;If you are an Atlas customer, there is free support offered 24/7 in the lower right hand corner of the UI.&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Thank you!&lt;br/&gt;
Rachelle&lt;/p&gt;</comment>
                            <comment id="3105154" author="dberman@socialnetwork.com" created="Sun, 24 May 2020 01:39:05 +0000"  >&lt;p&gt;If you have a document already in your database and you want to add a datetime field to your class, you need to use&#160;BsonDefaultValue or your serializer will throw an exception loading the existing document since the datetime field is missing from the document.&#160; However, BsonDefaultValue doesn&apos;t accept a datetime object, so this is a very painful problem.&lt;/p&gt;</comment>
                            <comment id="2163960" author="lawce" created="Wed, 27 Feb 2019 05:55:33 +0000"  >&lt;p&gt;Please find the below screenshot, I am using WebAPI in C# code to connect MongoDB. I declare the properties for BusinessModel and DataLayer.&#160;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/210060/210060_DataLayer.JPG&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;&lt;span class=&quot;image-wrap&quot; style=&quot;&quot;&gt;&lt;img src=&quot;https://jira.mongodb.org/secure/attachment/210059/210059_BusinessModel.JPG&quot; style=&quot;border: 0px solid black&quot; /&gt;&lt;/span&gt;&lt;/p&gt;</comment>
                            <comment id="2162819" author="jmikola@gmail.com" created="Tue, 26 Feb 2019 13:44:01 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=lawce&quot; class=&quot;user-hover&quot; rel=&quot;lawce&quot;&gt;lawce&lt;/a&gt;: Can you clarify which driver you&apos;re using? There is no reference to &quot;BsonDefaultValue&quot; or a &quot;datetime&quot; property in the &lt;a href=&quot;https://github.com/mongodb/mongo-c-driver&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongo-c-driver&lt;/a&gt; and &lt;a href=&quot;https://github.com/mongodb/mongo-cxx-driver&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;mongo-cxx-driver&lt;/a&gt; libraries, as far as I can tell. Additionally, it&apos;d be helpful to include a snippet of code that demonstrates the problem you&apos;re seeing (even if this issue ultimately needs to be moved to another project).&lt;/p&gt;</comment>
                    </comments>
                    <attachments>
                            <attachment id="210059" name="BusinessModel.JPG" size="44845" author="lawce" created="Wed, 27 Feb 2019 05:52:07 +0000"/>
                            <attachment id="210060" name="DataLayer.JPG" size="37967" author="lawce" created="Wed, 27 Feb 2019 05:54:18 +0000"/>
                    </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|hueg4f:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10558" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            </customfields>
    </item>
</channel>
</rss>