1
0
Fork 0
mirror of synced 2025-04-01 20:36:14 +03:00
doctrine2/tests/Doctrine/Tests/ORM/Functional
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
..
Locking Added test to demonstrate issue 2015-01-13 02:36:58 +01:00
SchemaTool Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
Ticket Reverting BC break in AbstractIdGenerator signature 2015-01-16 18:52:58 +01:00
AbstractManyToManyAssociationTestCase.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
AdvancedAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
AdvancedDqlQueryTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
BasicFunctionalTest.php DDC-3068 EntityManager clear() calls now follow cascade detach configuration. 2014-04-16 04:47:57 +00:00
ClassTableInheritanceTest.php Fixed typos 2013-03-11 00:08:58 +00:00
ClassTableInheritanceTest2.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ClearEventTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
CompositePrimaryKeyTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
CustomFunctionsTest.php Ability to define custom functions with callback + tests 2014-05-15 12:06:21 +02:00
DatabaseDriverTest.php Fixed the test expectations for the DatabaseDriver 2014-08-27 14:00:34 +02:00
DatabaseDriverTestCase.php [DDC-2387] Fix DatabaseDriver not working with combinations of composite/association keys. 2013-05-09 12:10:37 +02:00
DefaultValuesTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
DetachedEntityTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
EntityListenersTest.php split override test 2013-01-29 12:14:53 -02:00
EntityRepositoryCriteriaTest.php Add support for optimized contains 2014-05-17 12:54:25 +02:00
EntityRepositoryTest.php #1112 - adding test to verify that leading backslash is not relevant when fetching repositories 2014-08-18 15:11:39 +02:00
ExtraLazyCollectionTest.php Merge pull request #1249 from doctrine/extra-lazy-get-m2m 2015-01-15 03:36:35 +01:00
FlushEventTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
HydrationCacheTest.php Fix PostgreSQL test-failure. UnitOfWork#getEntityState() produced exists() queries because of unmanaged entity passed as parameter to AbstractQuery#setParameter(), thereby skewing the sql count 2012-07-08 16:57:40 +02:00
IdentityMapTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
IndexByAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
JoinedTableCompositeKeyTest.php Second level cache 2013-12-16 11:05:04 -05:00
LifecycleCallbackTest.php #470 DDC-54 DDC-3005 - simple-object hydration should also trigger postLoad events when iterating over single results 2015-01-13 01:42:03 +01:00
ManyToManyBasicAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ManyToManyBidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ManyToManyEventTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ManyToManySelfReferentialAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ManyToManyUnidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
MappedSuperclassTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
MergeSharedEntitiesTest.php #1173 - test CS fixes, reduced clutter code, made method names more explicit 2014-11-11 12:37:16 +01:00
MergeUninitializedProxyTest.php Don't load detached proxies when merging them. 2015-01-16 20:54:15 +01:00
NativeQueryTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
NewOperatorTest.php Added a fix for ObjectHydrator when the same number of scalar results and new object results exist 2014-12-19 14:06:03 -05:00
NotifyPolicyTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToManyBidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToManyOrphanRemovalTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToManySelfReferentialAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToManyUnidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToOneBidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToOneEagerLoadingTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToOneOrphanRemovalTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToOneSelfReferentialAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OneToOneUnidirectionalAssociationTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OrderedCollectionTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
OrderedJoinedTableInheritanceCollectionTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
PaginationTest.php #1188 - assertCount instead of assertEquals 2014-11-27 17:57:42 +01:00
PersistentCollectionCriteriaTest.php Renamed coll to collection and some small updates to tests. 2015-01-15 03:14:48 +00:00
PersistentCollectionTest.php Avoid PersistentCollection::isEmpty() to fully load the collection on extra lazy fetch. 2014-02-08 13:49:48 +00:00
PersistentObjectTest.php DDC-1448 - Add support for ObjectManagerAware interface and PersistentObject in ORM 2011-11-19 13:06:24 +01:00
PostFlushEventTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
PostLoadEventTest.php #1001 DDC-3005 - coverage annotations, minor CS fixes 2015-01-12 23:50:16 +01:00
ProxiesLikeEntitiesTest.php The proxy factory always expects non-null identifier values 2014-04-29 13:25:17 +02:00
QueryCacheTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
QueryDqlFunctionTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
QueryTest.php added more informative error messages when invalid parameter count 2014-07-15 13:17:22 +01:00
ReadOnlyTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ReferenceProxyTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
ResultCacheTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
SchemaValidatorTest.php Remove incorrect (outdated) validation for public fields in SchemaValidator 2014-02-06 13:02:41 +04:00
SecondLevelCacheAbstractTest.php Test empty collections second level cache 2014-02-11 17:39:16 +01:00
SecondLevelCacheCompositePrimaryKeyTest.php Fix CS and update docs 2013-12-16 11:05:04 -05:00
SecondLevelCacheConcurrentTest.php Fix non initialized association proxy 2013-12-20 10:39:03 -05:00
SecondLevelCacheCriteriaTest.php Fix tests by forcing collection initialization 2014-05-15 18:37:41 +02:00
SecondLevelCacheExtraLazyCollectionTest.php Fix CS and update docs 2013-12-16 11:05:04 -05:00
SecondLevelCacheJoinTableInheritanceTest.php Fix CS and update docs 2013-12-16 11:05:04 -05:00
SecondLevelCacheManyToManyTest.php Typo fix on many-to-many assocaition cascade test 2014-02-12 08:18:34 +01:00
SecondLevelCacheManyToOneTest.php Fix lazy association load 2014-01-28 12:26:10 -05:00
SecondLevelCacheOneToManyTest.php Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01:00
SecondLevelCacheOneToOneTest.php Fix cache misses using one-to-one inverse side 2013-12-20 15:37:07 -05:00
SecondLevelCacheQueryCacheTest.php [SLC] resolve association cache entry 2014-03-06 20:44:59 -05:00
SecondLevelCacheRepositoryTest.php Fix persister query cache invalidation 2013-12-16 11:05:04 -05:00
SecondLevelCacheSingleTableInheritanceTest.php Fix non initialized association proxy 2013-12-20 10:39:03 -05:00
SecondLevelCacheTest.php Second level cache 2013-12-16 11:05:04 -05:00
SequenceEmulatedIdentityStrategyTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
SequenceGeneratorTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
SingleTableCompositeKeyTest.php Second level cache 2013-12-16 11:05:04 -05:00
SingleTableInheritanceTest.php Fix tests for inheritance support 2014-05-15 18:22:56 +02:00
SQLFilterTest.php #1054 DDC-3161 - adding @group annotation for newly introduced tests 2015-01-13 02:06:39 +01:00
StandardEntityPersisterTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
TypeTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
TypeValueSqlTest.php Removed all useless occurrence of require_once TestInit.php 2014-04-07 14:43:25 +02:00
UnitOfWorkLifecycleTest.php Improved and extracted UnitOfWork error messages 2011-10-22 12:40:12 +02:00
UUIDGeneratorTest.php [DDC-451] Add test for UUIDGenerator 2012-03-12 12:48:14 +01:00
ValueObjectsTest.php fix handling infinite nesting of embeddables 2014-08-12 07:56:39 +02:00
VersionedOneToOneTest.php - Fixed the basic entity persister so that versioned OneToOne entities can be created 2014-10-01 14:01:44 +01:00