Marco Pivetta
4ed0a6ce53
#1172 - removing redundant tests
2015-01-16 21:25:25 +01:00
Marco Pivetta
3df119f4fe
#1172 - when merging an initialized proxy, the managed proxy must be initialized before merging
2015-01-16 21:23:47 +01:00
Marco Pivetta
a18f258b4d
#1172 - covering merging of managed proxies
2015-01-16 21:15:39 +01:00
Marco Pivetta
0329ac5074
#1172 - covering also detached proxies - merging operations should not initialize either proxy
2015-01-16 21:14:13 +01:00
Marco Pivetta
dde09872df
#1172 - writing a more concise test case about merging detached proxies
2015-01-16 21:09:53 +01:00
Mathieu De Zutter
318b23097b
Don't load uninitialized proxies after merging.
...
Previous patch avoided initialization of proxies before merging, mainly to
fix a bug with merging. However, later on, doctrine tries again to load
the proxy. This is unnecessary and thus has been removed. This way, a
round trip to the database is saved.
2015-01-16 20:54:15 +01:00
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
Marco Pivetta
f799986be1
Reverting BC break in AbstractIdGenerator signature
2015-01-16 18:52:58 +01:00
Marco Pivetta
dd8db1acd2
DDC-3427 - s/EntityManager/EntityManagerInterface in relevant tests about identifier generation
2015-01-16 14:22:03 +01:00
Guilherme Blanco
f90475772d
Classify persisters into more granular namespaces.
2015-01-16 00:10:25 +01:00
Guilherme Blanco
a1d77bdc65
Renamed coll to collection and some small updates to tests.
2015-01-15 03:14:48 +00:00
Marco Pivetta
55a75bfb1b
Merge pull request #1249 from doctrine/extra-lazy-get-m2m
...
Support for extra lazy get for both owning and inverse side on many to many associations.
2015-01-15 03:36:35 +01:00
Marco Pivetta
0106cba602
#881 DDC-2825 - reusing mapping files that already exist in models, where applicable
2015-01-14 19:17:39 +01:00
Marco Pivetta
7b168de236
#881 DDC-2825 - removing unused imports
2015-01-14 19:05:40 +01:00
Marco Pivetta
962f479318
#881 DDC-2825 - refactoring test logic, removing dead private method
2015-01-14 19:04:58 +01:00
Marco Pivetta
80ce601eae
#881 DDC-2825 - refactoring test logic to use data-provider instead of code repetitions
2015-01-14 19:02:44 +01:00
Marco Pivetta
f874189456
#881 DDC-2825 - refactoring tests for clarity/readability and ease of use
2015-01-14 18:56:37 +01:00
Marco Pivetta
9d6890e6ca
#881 DDC-2825 - expectations are the first parameter in an assertion
2015-01-14 18:50:17 +01:00
Marco Pivetta
67788d89b5
#881 DDC-2825 - simplifying/extracting test logic: moved verifying metadata into separate test method
2015-01-14 18:47:17 +01:00
Marco Pivetta
0a91b83e27
#881 DDC-2825 - exploding test case into smaller units
2015-01-14 18:34:58 +01:00
Marco Pivetta
6f85ca3356
#881 DDC-2825 - exploding test case into smaller units
2015-01-14 18:31:11 +01:00
Michaël Perrin
54b3c0548d
Fix persistence exception on a table with a schema on a platform without schema support
2015-01-14 15:48:49 +01:00
Marco Pivetta
c571f6f6a9
Correctly dealing with emulated cascades in ExtraLazyCollectionTest
2015-01-14 14:36:01 +01:00
Guilherme Blanco
25b7c64dc6
Implemented support for extra lazy get for both owning and inverse side on many to many associations.
2015-01-13 17:50:20 +00:00
Guilherme Blanco
de4723883f
Merge pull request #1171 from jaimz22/master
...
Improvements for complex select statements when using new object expression
2015-01-12 22:48:56 -05:00
Carnage
36f9822466
Added test to demonstrate issue
2015-01-13 02:36:58 +01:00
Marco Pivetta
ef5a3f1bb7
#1054 DDC-3161 - adding @group
annotation for newly introduced tests
2015-01-13 02:06:39 +01:00
Vladislav Veselinov
759836113f
assertion fix
2015-01-13 02:05:49 +01:00
Vladislav Veselinov
9cb17d2915
EntityManagerInterface instead of EntityManager
...
Make connection available in filters
Add test for the changes
2015-01-13 02:05:49 +01:00
Marco Pivetta
0ffc752f6f
#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
Marco Pivetta
5cd73f0d12
#470 DDC-54 DDC-3005 - reverting assertion
...
`postLoad` should be triggered eagerly when using `iterate()`, as worse problems may be experienced with
missed initialization via listeners.
2015-01-13 01:36:13 +01:00
Marco Pivetta
0a19fbb376
#470 DDC-54 DDC-3005 - minor test cleanups, changing test according to current limitation to document the actual expected behavior
2015-01-13 01:26:04 +01:00
Lukasz Cybula
aa4796cd0d
Moved postLoad dispatching from UnitOfWork to object hydrators
2015-01-13 01:03:48 +01:00
Marco Pivetta
22e12e0043
#1001 DDC-3005 - coverage annotations, minor CS fixes
2015-01-12 23:50:16 +01:00
Strate
367a79206d
DDC-3005. Renamed class by removing underscore
2015-01-12 22:34:24 +01:00
Strate
35ea399d33
DDC-3005 Defer invoking of postLoad event to the end of hydration cycle.
...
1. Refactor handling of hydration complete: delegate this task to special object
2. Write test case for situation, when inside postLoad listener other entity is loading.
3. Make test, written on second step, be able to pass :)
2015-01-12 22:34:24 +01:00
Strate
f3b31c2807
DDC-3005 Defer invoking of postLoad event to the end of hydration cycle.
...
This feature makes guarantee, that postLoad event fires after all associations are populated
2015-01-12 22:33:40 +01:00
Marco Pivetta
0f362b0650
#1245 DDC-2504 - removing duplicate test
2015-01-12 22:03:54 +01:00
Marco Pivetta
ebf5811761
#1245 DDC-2504 - extracting test:
...
Removing an unmanaged/persisted/new item from a one-to-many extra-lazy association to a JTI does not initialize the collection
2015-01-12 21:55:57 +01:00
Marco Pivetta
25d40caf1e
#1245 DDC-2504 - extracting test:
...
Removing a managed item from a one-to-many extra-lazy association to a JTI does not initialize the collection
2015-01-12 21:43:37 +01:00
Marco Pivetta
ec08286173
#1245 DDC-2504 - constants over string references
2015-01-12 21:37:53 +01:00
Marco Pivetta
7a0cb1c370
#1245 DDC-2504 - splitting test method into a test about count()
and one about contains()
on a lazy persistent collection
2015-01-12 21:34:12 +01:00
Marco Pivetta
8d287b17d7
#1245 DDC-2504 - splitting test method into single feature checks
2015-01-12 21:29:48 +01:00
Guilherme Blanco
932a56f26f
Internalize UnitOfWork in CollectionPersisters. Updated related code.
2015-01-12 19:52:27 +00:00
Guilherme Blanco
73afcec22a
Implemented support for one to many extra lazy with joined inheritance.
2015-01-12 18:15:13 +00:00
James Murray
2f76571d3a
Added a fix for ObjectHydrator when the same number of scalar results and new object results exist
...
Adding additional tests for mixed New object and scalar query
2014-12-19 14:06:03 -05:00
Marco Pivetta
64752532dd
#1188 - assertCount
instead of assertEquals
2014-11-27 17:57:42 +01:00
Marco Pivetta
42547234d2
#1188 - minor CS fixes (avoiding DQL one-liner)
2014-11-27 17:54:02 +01:00
Marco Pivetta
ecb09b5627
#1188 - accessing Doctrine\ORM\Tools\Pagination\Paginator#getCountQuery()
via reflection for test purposes
2014-11-27 17:50:27 +01:00
Merixstudio
18244161f7
Filtering by auto-increnement field causes test error.
...
Executing the same test many times causes error because AI fields.
2014-11-27 17:27:22 +01:00