<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sun May 19 04:37:14 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/DDC-2176/DDC-2176.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>[DDC-2176] Illegal offset type in isset or empty in UnitOfWork</title>
                <link>http://www.doctrine-project.org/jira/browse/DDC-2176</link>
                <project id="10032" key="DDC">Doctrine 2 - ORM</project>
                        <description>&lt;p&gt;Steps to reproduce the problem?&lt;/p&gt;
&lt;ul&gt;
	&lt;li&gt;A custom DBAL type, that extends a scalar build-in type e.g. &lt;tt&gt;DBAL\Types\StringType&lt;/tt&gt;&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;&lt;tt&gt;convertToPHPValue&lt;/tt&gt; of custom DBAL type returns an instance of a class (implements &lt;tt&gt;__toString&lt;/tt&gt; method)&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;Custom DBAL type is used as primary key in an entity&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;initially persist entity and flush entity manager&lt;/li&gt;
&lt;/ul&gt;


&lt;ul&gt;
	&lt;li&gt;modify entity (keep same primary key) and persist entity again causes:&lt;br/&gt;
&lt;font color=&quot;red&quot;&gt;&lt;br/&gt;
Warning: Illegal offset type in isset or empty in &lt;tt&gt;vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php&lt;/tt&gt; line 2407&lt;/font&gt;&lt;/li&gt;
&lt;/ul&gt;



&lt;p&gt;I guess the solution in &lt;tt&gt;Doctrine\ORM\Internal\Hydration&lt;/tt&gt; namespace by explicit converting result of &lt;tt&gt;convertToPHPValue&lt;/tt&gt; if result is not a scalar value.&lt;/p&gt;</description>
                <environment></environment>
            <key id="14279">DDC-2176</key>
            <summary>Illegal offset type in isset or empty in UnitOfWork</summary>
                <type id="1" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/bug.png">Bug</type>
                                <priority id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/minor.png">Minor</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="3">Duplicate</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="godzilla80">Yves Berkholz</reporter>
                        <labels>
                        <label>unitofwork</label>
                    </labels>
                <created>Wed, 28 Nov 2012 07:48:17 +0000</created>
                <updated>Wed, 1 May 2013 21:20:26 +0000</updated>
                    <resolved>Wed, 1 May 2013 21:20:26 +0000</resolved>
                            <version>2.3</version>
                                                <component>ORM</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>3</watches>
                        <comments>
                    <comment id="19389" author="ocramius" created="Wed, 23 Jan 2013 22:47:17 +0000"  >&lt;p&gt;This one will introduce way too much overhead. We don&apos;t really support identifiers that are custom object types.&lt;/p&gt;

&lt;p&gt;What is the exact version of the ORM? I couldn&apos;t spot anything at line 2407.&lt;/p&gt;</comment>
                    <comment id="19396" author="godzilla80" created="Thu, 24 Jan 2013 08:10:37 +0000"  >&lt;p&gt;I use a dev branch and updated the version since creation of the report, hence the line number changed to 2466.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-style: solid;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeHeader panelHeader&quot; style=&quot;border-bottom-width: 1px;border-bottom-style: solid;&quot;&gt;&lt;b&gt;UnitOfWork.php&lt;/b&gt;&lt;/div&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
} &lt;span class=&quot;code-keyword&quot;&gt;else&lt;/span&gt; {
	$entity = $&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;newInstance($class);
	$oid    = spl_object_hash($entity);

	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityIdentifiers[$oid]  = $id;
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;entityStates[$oid]       = self::STATE_MANAGED;
	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;originalEntityData[$oid] = $data;

	$&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;identityMap[$class-&amp;gt;rootEntityName][$idHash] = $entity; &lt;span class=&quot;code-comment&quot;&gt;// &amp;lt;- 2466
&lt;/span&gt;
	&lt;span class=&quot;code-keyword&quot;&gt;if&lt;/span&gt; ($entity &lt;span class=&quot;code-keyword&quot;&gt;instanceof&lt;/span&gt; NotifyPropertyChanged) {
		$entity-&amp;gt;addPropertyChangedListener($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;);
	}

	$overrideLocalValues = &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;;
}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; 

&lt;p&gt;Ok, I understand the overhead problem. I only tried to create a custom enum type that is represented by a class.&lt;br/&gt;
But i solved this by converting the value within the getter/setter of entity class.&lt;br/&gt;
It would have been nice to do this in the DBAL type, but it works that way.&lt;br/&gt;
Therefore, you might close the report or move it on a far future version &quot;wishlist&quot;. &lt;img class=&quot;emoticon&quot; src=&quot;http://www.doctrine-project.org/jira/images/icons/emoticons/smile.gif&quot; height=&quot;20&quot; width=&quot;20&quot; align=&quot;absmiddle&quot; alt=&quot;&quot; border=&quot;0&quot;/&gt;&lt;br/&gt;
Anyway, thank for your time.&lt;/p&gt;

&lt;p&gt;Nevertheless the information you requested:&lt;br/&gt;
Composer: doctrine/orm &lt;span class=&quot;error&quot;&gt;&amp;#91;2.3.x-dev fdd0af3&amp;#93;&lt;/span&gt; &lt;br/&gt;
git reference: &lt;a href=&quot;https://github.com/doctrine/doctrine2/archive/fdd0af34e6fced967b8751bc3e4792c11ef86d57.zip&quot; class=&quot;external-link&quot;&gt;fdd0af34e6fced967b8751bc3e4792c11ef86d57&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Additionally, exception trace might help&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; 
() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2466
 Symfony/Component/HttpKernel/Debug/ErrorHandler-&amp;gt;handle() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php:2466
 Doctrine/ORM/UnitOfWork-&amp;gt;createEntity() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:135
 Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator-&amp;gt;hydrateRowData() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php:50
 Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator-&amp;gt;hydrateAllData() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php:111
 Doctrine/ORM/Internal/Hydration/AbstractHydrator-&amp;gt;hydrateAll() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/Persisters/BasicEntityPersister.php:678
 Doctrine/ORM/Persisters/BasicEntityPersister-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:171
 Doctrine/ORM/EntityRepository-&amp;gt;findOneBy() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityRepository.php:211
 Doctrine/ORM/EntityRepository-&amp;gt;__call() at D:/projects/{projectname}/vendor/{customvendor}/lib-doctrine/src/{VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture.php:123
 {VendorNs}/Lib/Doctrine/ORM/Repository/BaseLookupRepository-&amp;gt;findOneById() at D:/projects/{projectname}/vendor/{customvendor}/lib-doctrine/src/{VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture.php:123
 {VendorNs}/Lib/Doctrine/DataFixtures/AbstractBaseFixture-&amp;gt;findPersistedEntity() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture.php:38
 {ProjectNs}/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture-&amp;gt;lookupentityDefaultBuilder() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData.php:59
 {ProjectNs}/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData-&amp;gt;onlinestatusBuild() at n/a:n/a
 call_user_func() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture.php:78
 {ProjectNs}/Bundle/DataFixturesBundle/Classes/ORM/LookupFixture-&amp;gt;lookupentityDefaultLoader() at D:/projects/{projectname}/src/ProjectVendor/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData.php:42
 {ProjectNs}/Bundle/DataFixturesBundle/DataFixtures/ORM/Main/User/LookupData-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/AbstractExecutor.php:120
 Doctrine/Common/DataFixtures/Executor/AbstractExecutor-&amp;gt;load() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:83
 Doctrine/Common/DataFixtures/Executor/ORMExecutor-&amp;gt;Doctrine/Common/DataFixtures/Executor/{closure}() at n/a:n/a
 call_user_func() at D:/projects/{projectname}/vendor/doctrine/orm/lib/Doctrine/ORM/EntityManager.php:223
 Doctrine/ORM/EntityManager-&amp;gt;transactional() at D:/projects/{projectname}/var/cache/apps/web/local/jms_diextra/doctrine/EntityManager_50ffafed6b09f.php:31
 EntityManager50ffafed6b09f_546a8d27f194334ee012bfe64f629947b07e4919/__CG__/Doctrine/ORM/EntityManager-&amp;gt;transactional() at D:/projects/{projectname}/vendor/doctrine/data-fixtures/lib/Doctrine/Common/DataFixtures/Executor/ORMExecutor.php:85
 Doctrine/Common/DataFixtures/Executor/ORMExecutor-&amp;gt;execute() at D:/projects/{projectname}/vendor/doctrine/doctrine-fixtures-bundle/Doctrine/Bundle/FixturesBundle/Command/LoadDataFixturesDoctrineCommand.php:106
 Doctrine/Bundle/FixturesBundle/Command/LoadDataFixturesDoctrineCommand-&amp;gt;execute() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Command/Command.php:238
 Symfony/Component/Console/Command/Command-&amp;gt;run() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:192
 Symfony/Component/Console/Application-&amp;gt;doRun() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Console/Application.php:78
 Symfony/Bundle/FrameworkBundle/Console/Application-&amp;gt;doRun() at D:/projects/{projectname}/vendor/symfony/symfony/src/Symfony/Component/Console/Application.php:105
 Symfony/Component/Console/Application-&amp;gt;run() at D:/projects/{projectname}/bin/console.php:17
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt; </comment>
                    <comment id="20184" author="beberlei" created="Wed, 1 May 2013 21:20:02 +0000"  >&lt;p&gt;This works in this recent commit here, 0864ab8adac5c31d5ba97f0eb6792e5431a75b70. Should have worked before as well. Can you verify?&lt;/p&gt;</comment>
                    <comment id="20185" author="beberlei" created="Wed, 1 May 2013 21:20:26 +0000"  >&lt;p&gt;Related to &lt;a href=&quot;http://www.doctrine-project.org/jira/browse/DDC-1998&quot; title=&quot;Problem when deleting with EntityManager-&amp;gt;remove($entity)&quot;&gt;&lt;del&gt;DDC-1998&lt;/del&gt;&lt;/a&gt;, tests this behavior&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>