<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Thu Jun 20 09:43:19 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-122/MODM-122.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-122] array_slice fails on ReferenceMany and EmbeddedMany fields</title>
                <link>http://www.doctrine-project.org/jira/browse/MODM-122</link>
                <project id="10044" key="MODM">Doctrine MongoDB ODM</project>
                        <description>&lt;p&gt;I am not sure if it&apos;s a bug of the framework or a bug in implementation of array_slice function in PHP&lt;br/&gt;
but when I try to pass @ReferenceMany field value into array_slice built-in PHP function it fails with error:&lt;/p&gt;

&lt;p&gt;==============================================&lt;br/&gt;
array_slice() expects parameter 1 to be array, object given&lt;br/&gt;
==============================================&lt;/p&gt;

&lt;p&gt;I know that PersistentCollection has method &quot;slice&quot; (at least in master branch) but my concern is backward compatibility with the code which treats ReferenceMany type fields as arrays.&lt;br/&gt;
The old code works perfectly until it uses array_slice.&lt;/p&gt;

&lt;p&gt;Please let me know are there any workarounds for this or probably you guys are going to implement some fix?&lt;/p&gt;

&lt;p&gt;Thanks a lot!&lt;/p&gt;</description>
                <environment>CentOS, PHP 5.3</environment>
            <key id="12402">MODM-122</key>
            <summary>array_slice fails on ReferenceMany and EmbeddedMany fields</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="6">Invalid</resolution>
                                <assignee username="jwage">Jonathan H. Wage</assignee>
                                <reporter username="vkaplich">Vitaliy Kaplich</reporter>
                        <labels>
                    </labels>
                <created>Thu, 17 Feb 2011 14:19:25 +0000</created>
                <updated>Thu, 17 Feb 2011 19:39:40 +0000</updated>
                    <resolved>Thu, 17 Feb 2011 19:39:40 +0000</resolved>
                            <version>1.0.0BETA1</version>
                                                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="15334" author="jwage" created="Thu, 17 Feb 2011 19:39:39 +0000"  >&lt;p&gt;Hi, you need to pass an array so you can convert the iterator to an array with the iterator_to_array() method or call -&amp;gt;toArray() on the PersistentCollection. Then you can pass that array to array_slice()&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>