1
0
mirror of synced 2025-01-07 09:37:11 +03:00
Commit Graph

5313 Commits

Author SHA1 Message Date
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
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
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
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
f799986be1 Reverting BC break in AbstractIdGenerator signature 2015-01-16 18:52:58 +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
6fc0d84b7a DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01:00
Guilherme Blanco
f90475772d Classify persisters into more granular namespaces. 2015-01-16 00:10:25 +01: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
514fd008b9 Cache regions will not modify the injected cache instance settings 2015-01-15 21:01:35 +01: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
Andrea Sprega
243210e896 DDC-3493 - fixed EntityGenerator parsing for php 5.5 "::class" syntax 2015-01-15 04:13:09 +01: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
Steve Müller
d343617f13 Merge pull request #1255 from Ocramius/cleanup/php-5.3-support-end
Cleanup: PHP 5.3 support end
2015-01-15 01:29:00 +01:00
Marco Pivetta
e2acd74cb4 #1072 DDC-3191 - minor performance optimization 2015-01-15 00:37:41 +01:00
Alexander Kurilo
58cd520e32 Fix attempt of traversing bool in FileLockRegion 2015-01-14 23:51:41 +01:00
Marco Pivetta
541e7bdf72 Refactoring test method: no need to test for PHP version 2015-01-14 20:13:46 +01:00
Marco Pivetta
8e28cb9119 Removing useless $self use statements, as PHP 5.4 supports $this in closures 2015-01-14 20:12:27 +01:00
Marco Pivetta
3ba9689448 #881 DDC-2825 - aligning assignments 2015-01-14 18:19:22 +01:00
Marco Pivetta
f0102a69f9 #881 DDC-2825 - refactoring mapping driver to use ClassMetadata#setPrimaryTable() instead of duplicating explode() logic 2015-01-14 18:12:12 +01:00
Marco Pivetta
eefa3b2e53 #881 DDC-2825 - correcting YAML driver implementation (wasn't using extracted schema) 2015-01-14 18:06:29 +01:00
Marco Pivetta
51bf82b7e7 #881 DDC-2825 - correcting PHP mapping behavior when using implicit schema in table name 2015-01-14 17:54:00 +01:00
Marco Pivetta
3820fa57d3 #881 DDC-2825 - XML mappings should handle explicitly defined schema name 2015-01-14 17:33:17 +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
ba5378fecc #385 #1181 DDC-3385 - fixing Events docblocks as per @deeky666's review 2015-01-13 21:15:34 +01:00
Marco Pivetta
ae8ab0812e #385 #1181 DDC-3385 - fixing OnClassMetadataNotFoundEventArgs docblocks as per @deeky666's review 2015-01-13 21:14:32 +01:00
Marco Pivetta
662b49608c #385 #1181 DDC-3385 - aligning tests and implementation to new OnClassMetadataNotFoundEventArgs API 2015-01-13 20:56:57 +01:00
Marco Pivetta
762e798d22 #385 #1181 DDC-3385 - extending OnClassMetadataNotFoundEventArgs from ManagerEventArgs instead of generic EventArgs 2015-01-13 20:56:21 +01:00
Marco Pivetta
6021e3a1b8 #385 #1181 DDC-3385 - Updating docblock of OnClassMetadataNotFoundEventArgs 2015-01-13 20:49:08 +01:00
Marco Pivetta
eaa9187dd8 #385 #1181 DDC-3385 - minor CS fix (spacing) 2015-01-13 20:33:30 +01:00
Marco Pivetta
8ea394e778 #385 #1181 DDC-3385 - removing @todo that was discussed/cleared 2015-01-13 20:33:10 +01:00
Marco Pivetta
a710706c81 #385 #1181 DDC-3385 - optimized imports, removing duplicate imports (caused by rebase conflicts) 2015-01-13 20:00:40 +01:00
Marco Pivetta
e4cbdb57ad Enabling fallback logic in metadata loading 2015-01-13 19:50:55 +01:00
Marco Pivetta
d91b0b4938 Minor CS fixes in the ResolveTargetEntityListener 2015-01-13 19:50:17 +01:00
Marco Pivetta
f5eb20b63d OnClassMetadataNotFoundEventArgs should support setting the actually resolved ClassMetadata as a mutable event result vector 2015-01-13 19:50:17 +01:00
Bart van den Burg
3be43a1def Rebased and renamed PreLoadClassMetadata to OnClassMetadataNotFound 2015-01-13 19:49:57 +01:00
Bart van den Burg
437f812718 Added new event to allow actions to be done before trying to load class metadata 2015-01-13 19:49:57 +01:00
Bart van den Burg
51528fbdea set metadata for interface to be able to fetch entites by interface name 2015-01-13 19:49:57 +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
Marco Pivetta
9c3cb57931 Merge branch 'optimize-persisters'
Close #1246
2015-01-13 15:05:45 +01:00
Marco Pivetta
35dd7f8e2b #1246 DDC-3487 - docblock args fixes 2015-01-13 15:03:04 +01:00
Marco Pivetta
278b8bfa08 #1246 DDC-3487 - minor alignment fixes 2015-01-13 14:58:56 +01:00