<!-- 
RSS generated by JIRA (9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66) at Thu Feb 08 08:36:11 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-1337] Support inline fields as pointer to struct/map (not just struct/map)</title>
                <link>https://jira.mongodb.org/browse/GODRIVER-1337</link>
                <project id="14289" key="GODRIVER">Go Driver</project>
                    <description>&lt;p&gt;Can&apos;t marshal/unmarshal inline structs that are under the pointer&lt;/p&gt;


&lt;p&gt;Example:&lt;br/&gt;
```golang&lt;/p&gt;

&lt;p&gt;package foobar&lt;/p&gt;

&lt;p&gt;import (&lt;br/&gt;
 &quot;context&quot;&lt;br/&gt;
 &quot;go.mongodb.org/mongo-driver/mongo&quot;&lt;br/&gt;
 &quot;go.mongodb.org/mongo-driver/mongo/options&quot;&lt;br/&gt;
 &quot;log&quot;&lt;br/&gt;
 &quot;testing&quot;&lt;br/&gt;
 &quot;time&quot;&lt;br/&gt;
)&lt;/p&gt;

&lt;p&gt;type MContainer struct &lt;/p&gt;
{
 M int `bson:&quot;m,omitempty&quot;`
}

&lt;p&gt;type FoobarWithPointer struct &lt;/p&gt;
{
 *MContainer `bson:&quot;,inline&quot;`
 A int
}

&lt;p&gt;type FoobarPointerless struct &lt;/p&gt;
{
 MContainer `bson:&quot;,inline&quot;`
 A int
}

&lt;p&gt;func TestSandbox(t *testing.T) {&lt;br/&gt;
 ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)&lt;br/&gt;
 client, _ := mongo.Connect(ctx, options.Client().ApplyURI(&quot;mongodb://localhost:27017&quot;))&lt;/p&gt;

&lt;p&gt; collection := client.Database(&quot;testing&quot;).Collection(&quot;numbers&quot;)&lt;br/&gt;
 _, err := collection.InsertOne(ctx, &amp;amp;FoobarPointerless{A: 1, MContainer: MContainer{M: 10}})&lt;br/&gt;
 log.Printf(&quot;pointerless: err = %s&quot;, err) // nil&lt;/p&gt;

&lt;p&gt; _, err = collection.InsertOne(ctx, &amp;amp;FoobarWithPointer{A: 1, MContainer: &amp;amp;MContainer{M: 10}})&lt;br/&gt;
 log.Printf(&quot;with pointer: err = %s&quot;, err) // cannot transform type *foobar.FoobarWithPointer to a BSON Document: (struct foobar.FoobarWithPointer) inline fields must be either a struct or a map&lt;br/&gt;
}&lt;/p&gt;

&lt;p&gt;```&lt;/p&gt;</description>
                <environment>go 1.13, linux</environment>
        <key id="966562">GODRIVER-1337</key>
            <summary>Support inline fields as pointer to struct/map (not just struct/map)</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="3">Duplicate</resolution>
                                        <assignee username="-1">Unassigned</assignee>
                                    <reporter username="evghenii.maslennikov@gmail.com">Evghenii Maslennikov</reporter>
                        <labels>
                    </labels>
                <created>Thu, 10 Oct 2019 14:38:41 +0000</created>
                <updated>Thu, 10 Oct 2019 20:12:39 +0000</updated>
                            <resolved>Thu, 10 Oct 2019 20:12:33 +0000</resolved>
                                    <version>1.1.2</version>
                                                    <component>BSON</component>
                                        <votes>0</votes>
                                    <watches>1</watches>
                                                                                                                <comments>
                            <comment id="2476458" author="esha.bhargava" created="Thu, 10 Oct 2019 20:12:33 +0000"  >&lt;p&gt;Same as &lt;a href=&quot;https://jira.mongodb.org/browse/GODRIVER-1305&quot; title=&quot;Allow inline fields to be pointers of struct&quot; class=&quot;issue-link&quot; data-issue-key=&quot;GODRIVER-1305&quot;&gt;&lt;del&gt;GODRIVER-1305&lt;/del&gt;&lt;/a&gt;&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|hvlhin:</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>