<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu May 23 20:22:49 UTC 2013

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 add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/MODM-153/MODM-153.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[MODM-153] &quot;Near&quot; Query does not work.</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-153</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;&quot;Near&quot; statement does not work for me. The following code returns  &lt;b&gt;all&lt;/b&gt;  cities from collection:&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;$cities = $this-&amp;gt;dm-&amp;gt;createQuery(&apos;City&apos;)
    -&amp;gt;field(&apos;coordinates&apos;)-&amp;gt;near(50, 60)
    -&amp;gt;execute();
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;Could you please fix it?&lt;/p&gt;</description>
                <environment></environment>
            <key id="12912">MODM-153</key>
            <summary>&quot;Near&quot; Query does not work.</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="2" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/critical.png">Critical</priority>
                    <status id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/open.png">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="dmitry-by">Dmitry</reporter>
                        <labels>
                    </labels>
                <created>Wed, 10 Aug 2011 12:55:40 +0000</created>
                <updated>Mon, 20 Feb 2012 19:54:57 +0000</updated>
                                    <version>1.0.0BETA2</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="16411" author="maarky" created="Fri, 2 Sep 2011 04:11:59 +0000"  >&lt;p&gt;It also does not work in beta3 but it fails differently. It never returns anything.&lt;/p&gt;

&lt;p&gt;$places = $documentManager-&amp;gt;createQueryBuilder(&apos;Documents\Place&apos;)&lt;br/&gt;
			-&amp;gt;field(&apos;point&apos;)&lt;br/&gt;
			-&amp;gt;near(36.5788494, -121.7207804)&lt;br/&gt;
			-&amp;gt;getQuery()&lt;br/&gt;
			-&amp;gt;execute();&lt;/p&gt;

&lt;p&gt;This returns 0 documents even though I have a point at 36.5788493, -121.7207805. Doctrine\MongoDB\Query\Builder::near() only takes one argument so the Y value is ignored. However, the docblock specifies 2 params.&lt;/p&gt;</comment>
                    <comment id="16426" author="timatej" created="Sun, 4 Sep 2011 19:10:45 +0000"  >&lt;p&gt;Hi All,&lt;/p&gt;

&lt;p&gt;Here is correct realization of this function in &lt;br/&gt;
Doctrine\MongoDB\Query\Builder&lt;/p&gt;

&lt;p&gt;    public function near($x, $y)&lt;/p&gt;
    {
        $this-&amp;gt;query[&apos;type&apos;] = Query::TYPE_GEO_LOCATION;
        $this-&amp;gt;query[&apos;near&apos;] = array($x, $y);
        return $this;
    }

&lt;p&gt;When may this fix appear in Doctrine ODM?&lt;/p&gt;

&lt;p&gt;Thanks!&lt;/p&gt;</comment>
                    <comment id="17468" author="nvoyageur" created="Mon, 20 Feb 2012 19:54:57 +0000"  >&lt;p&gt;I had the same issue on 1.0.0.BETA3.&lt;/p&gt;

&lt;p&gt;The solution was to change the query up a little.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-none&quot;&gt;$places = $this-&amp;gt;dm-&amp;gt;createQueryBuilder(&apos;\Application\Event&apos;)-&amp;gt;field(&apos;latitude&apos;)-&amp;gt;near(50)-&amp;gt;field(&apos;longitude&apos;)-&amp;gt;near(60)-&amp;gt;getQuery()-&amp;gt;execute(); 
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href=&quot;http://stackoverflow.com/a/9015906/179335&quot; class=&quot;external-link&quot;&gt;http://stackoverflow.com/a/9015906/179335&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>