1
0
mirror of synced 2024-12-05 03:06:05 +03:00
Commit Graph

245 Commits

Author SHA1 Message Date
Marco Pivetta
2a81adc1fc Correcting ObjectHydrator logic: if an array is a default value for a collection-valued property, it should be cast to a Collection 2015-04-03 15:28:53 +01:00
Jeroen Thora
a409e7591d Changed some wrong usage of the @internal phpdoc 2015-03-15 16:53:34 +01:00
Marco Pivetta
6fc0d84b7a DDC-3427 - s/EntityManager/EntityManagerInterface in type-hints 2015-01-16 14:21:30 +01: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
Marco Pivetta
f571a9ef88 #470 DDC-54 DDC-3005 - query iteration must cause eager hydrationComplete logic to be fired 2015-01-13 01:42:38 +01:00
Marco Pivetta
b1144e74ea #470 DDC-54 DDC-3005 - reverting hydrator changes, as patch DDC-3005 already deals with the issue 2015-01-13 01:09:23 +01:00
Lukasz Cybula
aa4796cd0d Moved postLoad dispatching from UnitOfWork to object hydrators 2015-01-13 01:03:48 +01:00
Marco Pivetta
d09280a1dc #1001 DDC-3005 - HydrationCompleteHandler cs fixes (line-wrap) 2015-01-13 00:52:12 +01:00
Marco Pivetta
45221b1951 #1001 DDC-3005 - removed HydrationCompleteHandler#invokeAllDeferredPostLoadEvents() (useless method call indirection) 2015-01-13 00:51:44 +01:00
Marco Pivetta
c9ccd91421 #1001 DDC-3005 - optimized HydrationCompleteHandler imports 2015-01-13 00:50:19 +01:00
Marco Pivetta
730c2a81f7 #1001 DDC-3005 - HydrationCompleteHandler static introspection cleanups, as well as memory and performance improvements 2015-01-13 00:50:05 +01:00
Marco Pivetta
7b81cfb6ea #1001 DDC-3005 - Minor CS fixes in HydrationCompleteHandler 2015-01-13 00:33:15 +01:00
Marco Pivetta
89530f88f7 #1001 DDC-3005 - Removing dead assignment HydrationCompleteHandler#__construct() 2015-01-13 00:32:10 +01:00
Marco Pivetta
516d04c391 #1001 DDC-3005 - Removing useless dependency from the HydrationCompleteHandler to the UnitOfWork 2015-01-13 00:31:32 +01:00
Marco Pivetta
af93539576 #1001 DDC-3005 - HydrationCompleteHandler should accept EntityManagerInterface instances 2015-01-13 00:06:07 +01:00
Strate
0c8a31bf2b DDC-3005. Revert empty line. Removed @since annotation 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
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
jaimz22
dd012dfd90 oops.. forgot to add a condition 2014-11-08 16:56:42 +00:00
jaimz22
e2f1ea7f23 stupid cloud 9 ide broke my code :( sorry 2014-11-08 16:45:58 +00:00
jaimz22
c47a072815 fixed for failing test case. when a single DTO is specified in the query, you no longer get a multidimensional array returned. 2014-11-08 16:36:55 +00:00
jaimz22
2ffda34f23 fixing a missing index error 2014-11-08 10:15:33 -05:00
James Murray
da7e4ed8de removing orphaned scalar results and allowing mixed results when use new object expressions 2014-10-28 17:59:37 -04:00
Ala Eddine Khefifi
f2bdfe102e Fixed missed initialization in CommitOrderCalculator.php 2014-10-12 14:04:41 +01:00
Ulf
a7aa634247 Fixed mapping of discriminator column
Added fix for [DDC-3170] (http://www.doctrine-project.org/jira/browse/DDC-3170).

When querying a simple entity which uses single table- or class table inheritance using simple object hydration (``AbstractQuery::HYDRATE_SIMPLEOBJECT``), the mapped discriminator column was not retrieved correctly.

If the column got an alias during result set mapping other than it's actual name (e.g. ``type34`` insteaad of ``type``) than this alias wasn't reverted when retrieving the discriminator column from the SQL result set.
2014-06-17 14:51:19 +02:00
Guilherme Blanco
48172f3a53 Readability update to hydrators. 2014-04-29 05:05:38 +00:00
Guilherme Blanco
9cd16ec56a More optimizations around hydrators. Pretty much same performance, just better memory footprint (-0.25MB). 2014-04-28 13:47:57 +00:00
Guilherme Blanco
be94eb9d1f Made ClassMetadata to be reused during gatherRowData() and also during hydrateRow() to share same fetches instead of recalculating all info again. Performance improvement after 100x runs comparison is around 4%. 2014-04-28 02:38:51 +00:00
Guilherme Blanco
35c8cd7f23 Added type conversion to meta column in case a type is specified (such as a foreign key or discriminator column). 2014-04-25 05:22:33 +00:00
Guilherme Blanco
21437bb276 Heavily simplified code on simple object hydrator. Code cleanup on column information cache; by reference cache variable is no longer needed and protected variable is used in a standardized way everywhere. 2014-04-25 03:41:14 +00:00
Guilherme Blanco
f7de00b401 Finalized fix for scalars and newObjects. 2014-04-24 05:21:24 +00:00
Guilherme Blanco
9692fc8c5b Fixed issue if aliases were specific names, you would either get completely misleading results (dql alias: scalars) or a fatal error (dql alias: newObjects). 2014-04-24 04:47:13 +00:00
Guilherme Blanco
a3febd79de Abstract cache information of field result for hydrators. 2014-04-23 18:50:29 +00:00
Guilherme Blanco
a4dac7a292 Highlighted intention of converting scalar types during single scalar or scalar hydration, but leaving it commented and added a note about the BC reason why we cannot do that for 2.X series. 2014-04-23 18:04:06 +00:00
Guilherme Blanco
9ebce31a46 Made AbstractHydrator::gatherRowData() more understandable without breaking functionality. 2014-04-23 06:08:18 +00:00
Guilherme Blanco
29de3e00ff Added support for NEW operator when using ArrayHydration if user desires to benefit from this funcionality. 2014-04-23 05:10:23 +00:00
Guilherme Blanco
38b6838386 DDC-2575 Fixed issue with associations when parent is not yet loaded, but child is being created and no link happens. 2014-04-18 05:21:27 +00:00
Guilherme Blanco
f5e6044cf5 Provided more decriptive explanation when single scalar hydrator is used and it returns multiple columns. 2014-04-17 01:09:33 +00:00
Guilherme Blanco
1488a509b2 DDC-2937 More informative response when using single scalar hydrator when it returns single row but multiple columns. 2014-04-16 05:44:54 +00:00
Frank Liepert
df020e08a0 [DDC-3076] Fix ObjectHydrator 2014-04-09 11:30:11 +02:00
Frank
d1c722c1d0 Fix: handle invalid discriminator value 2014-04-09 01:55:54 +02:00
Frank
f7b95c1aa5 Add: invalidDiscriminatorValue method 2014-04-09 01:55:49 +02:00
Fabio B. Silva
3529cd4282 Merge pull request #797 from peterkokot/patch-1
CS fixes
2013-11-16 10:52:09 -08:00
Benjamin Eberlei
9a3298347c [DDC-2759] Fix regression in ArrayHydrator introduced in DDC-1884 at SHA c7b4c9bf0f 2013-10-26 11:16:07 +02:00
flip111
62ae8dc81e Update SingleScalarHydrator error message
bummed into this one. Now more developer friendly :)
2013-10-02 14:12:35 +02:00
Peter Kokot
dca09148ca CS fixes 2013-09-22 02:12:30 +02:00
Guilherme Blanco
157588f6dc CS fixes. 2013-07-30 12:11:08 -04:00
Guilherme Blanco
c7b4c9bf0f Fixed DDC-1884. 2013-07-30 01:29:34 -04:00
Fabio B. Silva
c1e688fc81 drop useless support for associations 2013-06-12 10:30:51 -04:00