1
0
Fork 0
mirror of synced 2025-04-01 12:26:11 +03:00
doctrine2/lib/Doctrine/ORM
Mathieu De Zutter ec35d4886c Don't load detached proxies when merging them.
Ticket DDC-1392 fixed an issue where uninitialized proxies could not be merged
because the merge routine couldn't get the identifier from them. The soution
was to initialize the proxy.
Ticket DDC-1734 fixed the merging of *unserialized* uninitialized proxies by
resetting their internals, so these proxies were able to initialize, as required
by the fix for DDC-1392.

Somehow, in the meanwhile, the fix for DDC-1392 is not needed anymore:
reverting the patch will not break the associated test (but it does break the
test for DDC-1734). This means it is not needed anymore to initialize the proxy
when merging.

Uninitialized proxies that get merged should not be loaded at all.  Since they
are not initialized, the entity data for sure hasn't changed, so it can be
safely ignored. Actually, the only thing the data is needed for while merging,
is to copy it into the managed entity, but that one is already supposed to be
up to date. By not initializing the proxy, a potential database roundtrip is
saved, and the fix for DDC-1734 is not needed anymore.

Besides optimizing the merge, this patch also solves an issue with merging.
Currently, when a detached uninitialized proxy is merged while there is already a
corresponding managed entity (proxy or not), the ORM returns a blank entity
instead of returning the already managed entity. This patch makes sure that
already existing managed entities are re-used.
2015-01-16 20:54:15 +01:00
..
Cache Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
Decorator make lock mode usage consistent 2014-02-05 15:13:53 +01:00
Event #1209 DDC-3427 - removing leftover EntityManager hints (using interface instead) 2015-01-16 14:44:31 +01:00
Id Reverting BC break in AbstractIdGenerator signature 2015-01-16 18:52:58 +01:00
Internal DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Mapping #1133 DDC-3305 - minor cs fix (spacing) 2015-01-16 19:46:04 +01:00
Persisters #1209 DDC-3427 - removing leftover EntityManager hints (using interface instead) 2015-01-16 14:44:31 +01:00
Proxy DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Query DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Repository #1159 - protecting Doctrine\ORM\Repository\DefaultRepositoryFactory API by making it final and its protected members private 2014-10-14 01:46:50 +02:00
Tools DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Utility - Fixed the basic entity persister so that versioned OneToOne entities can be created 2014-10-01 14:01:44 +01:00
AbstractQuery.php DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Cache.php DDC-3078 - constructor should never be interfaced 2014-04-17 15:16:56 -04:00
Configuration.php Ensure query cache is not ArrayCache in production 2014-12-19 20:18:45 +01:00
EntityManager.php Fix switch non-uniform syntax 2014-06-29 18:00:02 +04:00
EntityManagerInterface.php CS/Typo Fixes 2013-12-16 15:55:54 -05:00
EntityNotFoundException.php #1240 DDC-3479 - Basic coverage for EntityNotFoundException 2015-01-13 02:55:51 +01:00
EntityRepository.php Remove useless dependency 2014-05-15 18:22:56 +02:00
Events.php #385 #1181 DDC-3385 - fixing Events docblocks as per @deeky666's review 2015-01-13 21:15:34 +01:00
LazyCriteriaCollection.php Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
NativeQuery.php Fixed unused 'use' statements. 2012-12-13 18:19:21 +00:00
NonUniqueResultException.php Fixed unused 'use' statements. 2012-12-13 18:19:21 +00:00
NoResultException.php Fixed missed documentation issues in Doctrine\ORM 2012-12-14 20:12:56 +00:00
OptimisticLockException.php Removed unnecessary is_object() check 2013-10-01 13:00:37 +02:00
ORMException.php Ensure query cache is not ArrayCache in production 2014-12-19 20:18:45 +01:00
ORMInvalidArgumentException.php Improve phrasing on exception message instead of trying to fix callers 2014-07-14 11:25:04 +02:00
PersistentCollection.php DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
PessimisticLockException.php Fix some LGPL occurances to MIT 2013-10-02 12:07:37 +02:00
Query.php added more informative error messages when invalid parameter count 2014-07-15 13:17:22 +01:00
QueryBuilder.php DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
README.markdown [2.0] Adding blank README files 2010-04-06 03:04:02 +00:00
TransactionRequiredException.php Fix some LGPL occurances to MIT 2013-10-02 12:07:37 +02:00
UnexpectedResultException.php Fixed unused 'use' statements. 2012-12-13 18:19:21 +00:00
UnitOfWork.php Don't load detached proxies when merging them. 2015-01-16 20:54:15 +01:00
Version.php Version 2.5.0-DEV 2013-11-19 11:50:43 -05:00