1
0
mirror of synced 2025-01-19 15:01:40 +03:00

5324 Commits

Author SHA1 Message Date
Marco Pivetta
c82794bff7 #1178 - handling traversal of association mapping data in lazy-loading many-to-many requests on the inverse side 2015-01-17 07:59:01 +01:00
Marco Pivetta
1e606d1ed3 #1178 - adding note about ClassMetadataInfo#getTypeOfColumn() being unreliable/dangerous 2015-01-17 07:59:01 +01:00
Marco Pivetta
41900dca76 #1178 - correctly handling initialization of collections referenced via custom DBAL types 2015-01-17 07:59:00 +01:00
Marco Pivetta
91bceca7ee #1178 - correcting collection insert/update logic to correctly cast values for custom typed columns 2015-01-17 07:59:00 +01:00
Marco Pivetta
aaa6443954 #1178 - PersisterHelper::getTypeOfColumn() should not fail silently, as that makes persister bugs impossible to spot 2015-01-17 07:59:00 +01:00
Marco Pivetta
a80532a538 #1178 - correcting association column type when dealing with multiple derived associations/identifier levels
Since the ClassMetadata can only know about internal state, any `joinColumn` association details on the
inverse side of an association need to be computed by fetching associated metadata.
2015-01-17 07:59:00 +01:00
Marco Pivetta
445798ed46 #1178 - reverting patch and keeping tests (rebase gone awry)
Also cleaning up `OrmFunctionalTestCase`
2015-01-17 07:59:00 +01:00
Jasper N. Brouwer
5c1d1931b7 Fixed typehints and use statements 2015-01-17 07:59:00 +01:00
Jasper N. Brouwer
fe21f18991 Fixed doc-blocks 2015-01-17 07:59:00 +01:00
Jasper N. Brouwer
a0b43d0a7f Don't alias PersisterHelper to Helper 2015-01-17 07:58:59 +01:00
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
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