1
0
mirror of synced 2025-01-10 11:07:10 +03:00
doctrine2/tests/Doctrine/Tests/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 Adding EntityManagerDecorator base class as an extension point for EntityManager 2013-03-06 23:30:47 +01:00
Entity Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
Event #385 #1181 DDC-3385 - test coverage for OnClassMetadataNotFoundEventArgs impl 2015-01-13 21:04:50 +01:00
Functional Don't load detached proxies when merging them. 2015-01-16 20:54:15 +01:00
Hydration Fixed issue if aliases were specific names, you would either get completely misleading results (dql alias: scalars) or a fatal error (dql alias: newObjects). 2014-04-24 04:47:13 +00:00
Id Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
Internal #1001 DDC-3005 - Verifying HydrationCompleteHandler skips over registered deferred loads that were already handled by hydrationComplete 2015-01-13 00:48:53 +01:00
Mapping #1133 DDC-3305 - test case with embeddable without referenced embeddable class 2015-01-16 19:45:16 +01:00
Performance Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
Persisters Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
Proxy Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
Query Renamed coll to collection and some small updates to tests. 2015-01-15 03:14:48 +00:00
Repository #1159 - EOF EOL CS fixes for Doctrine\ORM\Repository\DefaultRepositoryFactory tests 2014-10-14 01:49:57 +02:00
Tools Test case for "class" keyword 2015-01-15 04:12:31 +01:00
Utility - Fixed the basic entity persister so that versioned OneToOne entities can be created 2014-10-01 14:01:44 +01:00
CommitOrderCalculatorTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ConfigurationTest.php Ensure query cache is not ArrayCache in production 2014-12-19 20:18:45 +01:00
EntityManagerTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
EntityNotFoundExceptionTest.php #1240 DDC-3479 - Basic coverage for EntityNotFoundException 2015-01-13 02:55:51 +01:00
LazyCriteriaCollectionTest.php Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
PersistentCollectionTest.php convert PersistentCollection functional tests to unit tests 2013-07-23 09:40:46 -04:00
QueryBuilderTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
UnitOfWorkTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00