mirror of
https://github.com/doctrine/orm.git
synced 2026-04-26 16:08:03 +02:00
DDC-381: InvalidArgumentException: New entity detected during merge. Persist the new entity before merging. #476
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Feb 26, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user cloun:
I have attached my test project, except 'Doctrine' folder with Doctrine 2 project.
What I did:
Steps for reproducing:
Simple workaroung for me is to make all private fields as protected.
@doctrinebot commented on GitHub (Feb 26, 2010):
Comment created by cloun:
When I changed access for the user's field from private to protected, I faced with another error:
Fatal error: Call to a member function load() on a non-object in ...\models\proxies\UserProxy.php on line 17
Call Stack:
0.0003 338752 1. {main}() \test.php:0
0.0928 3940528 2. Proxies\UserProxy->getPhones() \test.php:29
0.0928 3940528 3. Proxies\UserProxy->_load() \models\proxies\UserProxy.php:40
@doctrinebot commented on GitHub (Feb 26, 2010):
Comment created by @beberlei:
Thank you for reporting this issue.
Please create a unit-test, in the schema of tests\Doctrine\Tests\ORM\Functional\Ticket and attach it as a .patch or .diff or .php file. This is not a minimal re-produce case that can be easily understood or run by us.
@doctrinebot commented on GitHub (Feb 28, 2010):
Comment created by @beberlei:
Are you by any chance still using ALPHA3 ?
@doctrinebot commented on GitHub (Feb 28, 2010):
Comment created by @beberlei:
This issue is two-fold:
The fatal error issue is fixed, the first point is clearly documented now. Issue closed.
@doctrinebot commented on GitHub (Feb 28, 2010):
Issue was closed with resolution "Fixed"
@doctrinebot commented on GitHub (Mar 1, 2010):
Comment created by cloun:
Thanks again!
But, may be it would be better to correct code generation for generating classes with protected fields?
@Benjamin Eberlei:
I use trunk, I don't know what version is in trunc =)
@doctrinebot commented on GitHub (Mar 1, 2010):
Comment created by @beberlei:
@Valery: The database to annotation converter is not a tool that you should use during your development. It is to generate the entities once from a legacy database schema. Doctrine 2s preferred way is to generate the schema FROM the entities using SchemaTool, not the other way round.
@doctrinebot commented on GitHub (Mar 1, 2010):
Comment created by cloun:
Right! I agree, but in any case, this tool exists, and many people will use it. Now, this tool generates classes without supporting of serialization. It looks like a bug..