Jasper N. Brouwer
7b9c6a69bd
Add tests for extra lazy many-to-many associations
...
and fixed production code
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
ba3df8577b
Refined and added tests, fixed found issues
...
- Renamed id properties so they don't coexist between entities in a test
- Added tests for extra lazy one-to-many associations
- Fixed production code to make tests green
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
f7b14085f2
Abstracted infering binding types away in a helper
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
4f9f7eedf5
Removed DDC-3380 mentions in production code
2015-01-17 07:58:59 +01:00
Jasper N. Brouwer
f60f2a567a
Fixed associations using a value-conversion type for identifiers
2015-01-17 07:58:59 +01:00
Marco Pivetta
f6445d5a3e
Fixing build using a dedicated in-memory connection to stub out two real connections for DB-access checks
2015-01-17 07:58:35 +01:00
Marco Pivetta
074ec358ab
Merge branch 'hotfix/#1172-avoid-proxy-initialization-when-proxy-is-merged-into-uow'
...
Close #1172
2015-01-16 22:56:03 +01:00
Marco Pivetta
57ce6ccfcf
#1172 - fixed minor CS issues (spacing)
2015-01-16 22:54:30 +01:00
Marco Pivetta
45e733eb60
#1172 - adding @method
annotation to simplify static introspection
2015-01-16 22:50:52 +01:00
Marco Pivetta
42c9ff026e
#1172 - renaming test class for clarity
2015-01-16 22:47:00 +01:00
Marco Pivetta
937113e234
#1172 - simplified logic, re-using existing generic model
2015-01-16 22:46:31 +01:00
Marco Pivetta
cd3fc6e6ea
#1172 - adding required @group
annotations for newly introduced tests
2015-01-16 22:43:52 +01:00
Marco Pivetta
94724b7a56
#1172 - reverted: moving MergeUninitializedProxyTest
tests into EntityManagerTest
(invalid, as they are functional tests)
2015-01-16 22:43:03 +01:00
Marco Pivetta
3769cd1119
#1172 - adding required @group
annotations for newly introduced tests
2015-01-16 22:37:38 +01:00
Marco Pivetta
70840131ff
#1172 - moved MergeUninitializedProxyTest
tests into EntityManagerTest
2015-01-16 22:36:30 +01:00
Marco Pivetta
438feccd55
#1172 - removing redundant test logic
2015-01-16 22:25:41 +01:00
Marco Pivetta
de4e980389
#1172 - covering merging of unmanaged, un-initialized proxies bound to a different entity manager
2015-01-16 22:25:00 +01:00
Marco Pivetta
b7566dc65b
#1172 - correcting test: all connections should have a saved file instance
2015-01-16 22:20:58 +01:00
Marco Pivetta
d1e7960f99
#1172 - tests to verify that proxies keep distinct entity manager instances even across merging operations
2015-01-16 22:12:42 +01:00
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
f28654de12
Merge branch 'hotfix/#1133-better-exception-message-on-missing-embeddable-class-in-metadata'
...
Close #1133
2015-01-16 19:50:26 +01:00
Marco Pivetta
935a79e15f
#1133 DDC-3305 - minor cs fix (spacing)
2015-01-16 19:46:04 +01:00
Marco Pivetta
7e4dab17ec
#1133 DDC-3305 - test case with embeddable without referenced embeddable class
2015-01-16 19:45:16 +01:00
Javier Spagnoletti
705a7d2cc2
[Embeddables] Improved exception message when embeddables is missing 'class' attribute.
2015-01-16 19:18:46 +01:00
Marco Pivetta
655394d433
Merge branch 'hotfix/abstract-id-generator-revert-bc-break'
2015-01-16 18:53:36 +01:00
Marco Pivetta
6acfdc1439
Removing Doctrine\ORM\Id\AbstractIdGenerator#generate(EntityManagerInterface $em, $entity)
from upgrade notes (BC break reverted)
2015-01-16 18:53:27 +01:00
Marco Pivetta
f799986be1
Reverting BC break in AbstractIdGenerator signature
2015-01-16 18:52:58 +01:00
Marco Pivetta
de589799e8
Merge pull request #1209 from Ocramius/hotfix/DDC-3427-allow-entitymanagerinterface-globally
...
s/EntityManager/EntityManagerInterface in type-hints
2015-01-16 15:06:58 +01:00
Marco Pivetta
efe9e3ab28
#1209 DDC-3427 - documenting s/EntityManager
/EntityManagerInterface
signature BC breaks
2015-01-16 14:55:16 +01:00
Marco Pivetta
339bd23ac8
#1209 DDC-3427 - removing leftover EntityManager
hints (using interface instead)
2015-01-16 14:44:31 +01:00
Marco Pivetta
dd8db1acd2
DDC-3427 - s/EntityManager/EntityManagerInterface in relevant tests about identifier generation
2015-01-16 14:22:03 +01:00
Marco Pivetta
6fc0d84b7a
DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints
2015-01-16 14:21:30 +01:00
Marco Pivetta
0e7646cf4b
Merge branch 'namespace-persisters'
...
Close #1258
2015-01-16 00:10:56 +01:00
Guilherme Blanco
f90475772d
Classify persisters into more granular namespaces.
2015-01-16 00:10:25 +01:00
Fabio B. Silva
f97bb00dff
Merge pull request #1259 from Ocramius/hotfix/cache-region-cache-namespace-mutability-removal
...
Hotfix: Cache region should not mutate injected cache instance settings
2015-01-15 15:26:23 -05:00
Marco Pivetta
0f2c117f3e
Cloning and configuring the cache adapter for each newly created cache region (fixes cache namespacing)
2015-01-15 21:17:49 +01:00
Marco Pivetta
6564f95260
Typo fix (region should be named 'bar'
, not 'foo'
2015-01-15 21:17:25 +01:00
Marco Pivetta
a82eecfc07
Each cache region built by the DefaultCacheFactory
should have its own cache with its own unique namespace
2015-01-15 21:15:38 +01:00
Marco Pivetta
514fd008b9
Cache regions will not modify the injected cache instance settings
2015-01-15 21:01:35 +01:00
Marco Pivetta
f38d4551f1
Cache regions should not modify the injected cache instance settings
2015-01-15 21:01:02 +01:00
Guilherme Blanco
0b2fb7fd78
Fixed identifier quoting in functional tests.
2015-01-15 03:55:29 +00:00
Guilherme Blanco
8a0989aa50
Fixed identifier quoting in functional tests.
2015-01-15 03:50:18 +00:00
Marco Pivetta
5bd921139e
Merge branch 'hotfix/#1250-DDC-3493-fix-class-pseudo-constant-parsing-in-entitygenerator'
2015-01-15 04:16:44 +01:00
Guilherme Blanco
a1d77bdc65
Renamed coll to collection and some small updates to tests.
2015-01-15 03:14:48 +00:00