<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 08:35:06 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://doctrine-project.org/jira/si/jira.issueviews:issue-xml/DDC-1241/DDC-1241.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://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>[DDC-1241] Additional parameters for EntityRepository::findAll() and EntityRepository::findOneBy()</title>
                <link>http://doctrine-project.org/jira/browse/DDC-1241</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;In the Doctrine 2.1 versions the method &lt;tt&gt;EntityRepository::findBy()&lt;/tt&gt; accepts additional parameters for ordering, limit and offset.&lt;br/&gt;
Great feature! (While waiting for it I extended the &lt;tt&gt;EntityRepository&lt;/tt&gt; class and implemented these parameters myself using a &lt;tt&gt;QueryBuilder&lt;/tt&gt;.)&lt;/p&gt;

&lt;p&gt;It would be nice for the method &lt;tt&gt;EntityRepository::findOneBy()&lt;/tt&gt; to accept an additional parameter for ordering as well. It could use the following signature:&lt;br/&gt;
&lt;tt&gt;public function findOneBy(array $criteria, array $orderBy = null);&lt;/tt&gt;&lt;br/&gt;
This would be useful for various cases, for example: finding the newest blog-post.&lt;/p&gt;

&lt;p&gt;And maybe update &lt;tt&gt;EntityRepository::findAll()&lt;/tt&gt; as well with the signature:&lt;br/&gt;
&lt;tt&gt;public function findAll(array $orderBy = null);&lt;/tt&gt;&lt;/p&gt;

&lt;p&gt;Looking forward to your thoughts.&lt;/p&gt;</description>
                <environment></environment>
            <key id="12767">DDC-1241</key>
            <summary>Additional parameters for EntityRepository::findAll() and EntityRepository::findOneBy()</summary>
                <type id="4" iconUrl="http://doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="5" iconUrl="http://doctrine-project.org/jira/images/icons/priorities/trivial.png">Trivial</priority>
                    <status id="5" iconUrl="http://doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                    <security id="10000">All</security>
                        <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="jasper@nerdsweide.nl">Jasper N. Brouwer</reporter>
                        <labels>
                    </labels>
                <created>Fri, 1 Jul 2011 08:09:37 +0000</created>
                <updated>Fri, 9 Nov 2012 20:34:28 +0000</updated>
                    <resolved>Tue, 6 Nov 2012 00:32:50 +0000</resolved>
                            <version>2.1</version>
                                <fixVersion>2.3.1</fixVersion>
                                <component>ORM</component>
                        <due></due>
                    <votes>1</votes>
                        <watches>4</watches>
                        <comments>
                    <comment id="16218" author="dieterprovoost" created="Wed, 27 Jul 2011 08:59:26 +0000"  >&lt;p&gt;I can&apos;t seem to find the implementation of this even though this issue has been resolved. Is this possible?&lt;/p&gt;</comment>
                    <comment id="16219" author="beberlei" created="Wed, 27 Jul 2011 09:09:29 +0000"  >&lt;p&gt;It was only added to &quot;findBy&quot;&lt;/p&gt;</comment>
                    <comment id="16220" author="jasper@nerdsweide.nl" created="Wed, 27 Jul 2011 09:14:40 +0000"  >&lt;p&gt;So the resolution is actually a &quot;won&apos;t fix&quot; (in stead of &quot;fixed&quot;)?&lt;/p&gt;

&lt;p&gt;I know this was added to &quot;findBy&quot;, but my request was to extend the &quot;findOneBy&quot; and &quot;findAll&quot; as well...&lt;/p&gt;</comment>
                    <comment id="16221" author="dieterprovoost" created="Wed, 27 Jul 2011 09:15:46 +0000"  >&lt;p&gt;Can it also be added to &quot;findOneBy&quot;? It would come in very handy for the use case above (for example: finding the newest blog-post). &lt;br/&gt;
Otherwise, I think we are limited to the alternative using &quot;findBy&quot; with the orderBy parameter (thus fetching all entries, followed by returning only the first/last) or using a native query.&lt;/p&gt;</comment>
                    <comment id="16222" author="beberlei" created="Wed, 27 Jul 2011 09:37:41 +0000"  >&lt;p&gt;Reopened for 2.2 with implementation for &quot;findOneby()&quot;&lt;/p&gt;</comment>
                    <comment id="17080" author="guilhermeblanco" created="Tue, 20 Dec 2011 22:24:05 +0000"  >&lt;p&gt;Updating fix version&lt;/p&gt;</comment>
                    <comment id="18916" author="nemek_zg" created="Mon, 5 Nov 2012 19:04:15 +0000"  >&lt;p&gt;A proposed implementation of &lt;tt&gt;findOneBy&lt;/tt&gt; with ordering is available with the following pull request: &lt;a href=&quot;https://github.com/doctrine/doctrine2/pull/504&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/pull/504&lt;/a&gt;.&lt;/p&gt;</comment>
                    <comment id="18940" author="fabio.bat.silva" created="Tue, 6 Nov 2012 00:32:50 +0000"  >&lt;p&gt;Fixed : &lt;a href=&quot;https://github.com/doctrine/doctrine2/commit/283ed55824b7c713611e4b1e336551be805c48b5&quot; class=&quot;external-link&quot;&gt;https://github.com/doctrine/doctrine2/commit/283ed55824b7c713611e4b1e336551be805c48b5&lt;/a&gt;&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>