<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:34:34 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>[GODRIVER-607] All the field names are saved /converted lowercase</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-607</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;I have a struct as below. After storing it I&apos;ve found (to my horror) that all the field names have been converted to a lowercase version.&#160;&lt;/p&gt;


&lt;p&gt;type Order struct &lt;/p&gt;
{
&#160;&#160;&#160;&#160;TransactionID string
&#160;&#160;&#160;&#160;InvoiceID int
&#160;&#160;&#160;&#160;ID string
}


{ &quot;_id&quot; : &quot;efaa0eab-1200-439d-a9bc-5783e6574aaf&quot;,&#160;&#160;&quot;transactionid&quot; : &quot;sample transaction ID&quot;, &quot;invoiceid&quot; : NumberLong(1), &quot;id&quot; : &quot;efaa0eab-1200-439d-a9bc-5783e6574aaf&quot;}</description>
                <environment></environment>
        <key id="621599">GODRIVER-607</key>
            <summary>All the field names are saved /converted lowercase</summary>
                <type id="1" iconUrl="https://jira.mongodb.org/secure/viewavatar?size=xsmall&amp;avatarId=14703&amp;avatarType=issuetype">Bug</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="13202">Works as Designed</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="themihai">Mihai B</reporter>
                        <labels>
                    </labels>
                <created>Fri, 19 Oct 2018 13:21:13 +0000</created>
                <updated>Fri, 27 Oct 2023 13:16:38 +0000</updated>
                            <resolved>Tue, 6 Nov 2018 22:56:20 +0000</resolved>
                                                                                        <votes>0</votes>
                                    <watches>3</watches>
                                                                                                                <comments>
                            <comment id="2059419" author="kris.brandow" created="Mon, 12 Nov 2018 21:50:55 +0000"  >&lt;p&gt;The StructTagParser handles generating the name for the field.&lt;/p&gt;</comment>
                            <comment id="2057937" author="themihai" created="Sat, 10 Nov 2018 13:53:04 +0000"  >&lt;p&gt;The structs have no tags so the StructTagCode is not helping it. However it looks like that I could register a patched  `ValueEncoder`. &lt;/p&gt;</comment>
                            <comment id="2052491" author="kris.brandow" created="Mon, 5 Nov 2018 21:20:51 +0000"  >&lt;p&gt;Closing due to inactivity.&lt;/p&gt;</comment>
                            <comment id="2040513" author="kris.brandow" created="Wed, 24 Oct 2018 15:10:37 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=themihai&quot; class=&quot;user-hover&quot; rel=&quot;themihai&quot;&gt;themihai&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;If you want to customize this behavior for everything, you can create a new &lt;tt&gt;bsoncodec.StructTagParser&lt;/tt&gt; and assign it to &lt;tt&gt;bsoncodec.DefaultStructTagParser&lt;/tt&gt; or use it while creating a new &lt;tt&gt;bsoncodec.StructTagCodec&lt;/tt&gt; and register that codec with the &lt;tt&gt;*bsoncodec.Registry&lt;/tt&gt; that you use.&lt;/p&gt;

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

&lt;p&gt;--Kris&lt;/p&gt;</comment>
                            <comment id="2040114" author="themihai" created="Wed, 24 Oct 2018 06:44:37 +0000"  >&lt;p&gt;@Kris, would you consider an option to config the encoder(bson) &#160;to use the Go convention(case name + inline behaviour) ? I could add tags but that would mean modifying all my types and perhaps also creating new/duplicate types with bson tags for the packages that I don&apos;t own. An option to use the &quot;standard&quot; go behaviour would be quite handy for people migrating to mongo.&lt;/p&gt;</comment>
                            <comment id="2039674" author="calvinl" created="Tue, 23 Oct 2018 19:38:27 +0000"  >&lt;p&gt;I just wanted to elaborate on this a bit more, as I originally came here to ask for clarification, and then figured it out myself &lt;img class=&quot;emoticon&quot; src=&quot;https://jira.mongodb.org/images/icons/emoticons/tongue.png&quot; height=&quot;16&quot; width=&quot;16&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;/p&gt;

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

&lt;p&gt;You need to put a tag `bson:&quot;MyDesiredName&quot;` beside the struct field.&lt;/p&gt;</comment>
                            <comment id="2037542" author="kris.brandow" created="Mon, 22 Oct 2018 15:58:57 +0000"  >&lt;p&gt;Hi &lt;a href=&quot;https://jira.mongodb.org/secure/ViewProfile.jspa?name=themihai&quot; class=&quot;user-hover&quot; rel=&quot;themihai&quot;&gt;themihai&lt;/a&gt;,&lt;/p&gt;

&lt;p&gt;This behavior is in line with how the community Go driver&apos;s BSON library behaves. If you wish to keep casing for your field names, please add struct tags or use a custom value encoder.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;Kris&lt;/p&gt;</comment>
                    </comments>
                    <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|hu13jb:</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>