1
0
mirror of synced 2025-02-03 05:49:25 +03:00

464 Commits

Author SHA1 Message Date
Marco Pivetta
14e0800293 #5849 #5850 renamed clearIdentityMap to clearIdentityMapForEntityName, for clarity 2016-06-06 00:10:18 +02:00
Rico Humme
beb2641492 Correct naming convention of function. Was confusing otherwise 2016-06-05 23:16:09 +02:00
Rico Humme
4d48781e2b Split of functionality in separate functions 2016-06-05 23:16:09 +02:00
Rico Humme
70603ee3db Clear entityInsertions for specific entityName 2016-06-05 23:16:09 +02:00
Mikhail Shamin
bf322b903d Optimize imports. Remove full qualified class names 2016-05-11 01:55:12 +07:00
Guilherme Blanco
9b4c50e81e Final work around entity changeset fix 2016-02-16 05:03:11 +00:00
Guilherme Blanco
b784a04cf7 Fixed only variables should be passed by reference issue 2016-02-16 04:46:34 +00:00
Guilherme Blanco
86cde3a9df Fixed #5605 2016-02-16 03:21:53 +00:00
Steve Müller
1697293591 Merge pull request #1563 from rawkode/bugfix/incorrect-rollback-method-name
Fixing method name 'rollBack', which was documented as 'rollback'
2016-01-06 11:49:32 +01:00
Jeroen Thora
6dcb97a20e Fixed many small phpcs issues 2015-12-11 20:30:41 +01:00
Marco Pivetta
3971e8c55b Merge branch 'hotfix/#1573-merge-associated-versioned-entity'
Close #1573
2015-12-11 20:17:05 +01:00
Marco Pivetta
16baa8d60f #1573 - correcting docblock arguments/description 2015-12-11 20:00:08 +01:00
bilouwan
fb4d02c69b Refactor testing Proxy not initilized 2015-12-04 14:49:01 +01:00
Maximilian Bosch
f840f0d464 DDC-4022 execute callback parameter directly instead of using call_user_func 2015-12-01 22:31:27 +01:00
Maximilian Bosch
11f9b00d53 DDC-4022 method naming 2015-12-01 22:31:26 +01:00
Maximilian Bosch
33476d8c34 DDC-4022 minor improvements 2015-12-01 22:31:25 +01:00
Maximilian Bosch
c337f8f5c7 DDC-4022 deduplication of internal UnitOfWork methods
the methods UnitOfWork#afterTransactionRolledBack() and UnitOfWork#afterTransactionComplete do almost the same, so it can be abstracted into another private method.
2015-12-01 22:31:25 +01:00
David McKay
3c7d92e4cc Fixed incorrect case of another two references of rollback 2015-11-30 16:53:31 +00:00
Guilherme Blanco
8ea62b95b8 Tests around reported cases over DDC-2524 2015-11-27 18:44:23 +00:00
bilouwan
832adae6b4 Unit test & fix for merge versionned entity 2015-11-27 17:28:45 +01:00
Guilherme Blanco
58992ad523 Fixed support for inverse side second level cache 2015-11-12 05:00:08 +00:00
Guilherme Blanco
1587aac4ff Added support for OneToMany with orphanRemoval. Replacing entire collection now deletes the replaced collection (scheduled for deletion). No event handling is done as it happens at DBAL level. 2015-11-05 00:08:44 -05:00
Lenard Palko
977f0a5b5c Fix skipping properties if they are listed after a not loaded relation. 2015-07-15 21:26:45 +01:00
Christian Schmidt
96dbecec24 [DDC-3382] Allow orphan removal to be cancelled 2015-06-12 16:44:13 +02:00
Josef Kříž
e57be9da5e Fix: generated IDs are converted to integer 2015-03-23 17:51:04 +01:00
nclavaud
b492d61398 Update identityMap when entity gets managed again
http://www.doctrine-project.org/jira/browse/DDC-3619

When using SoftDeleteable doctrine extension, an entity can be scheduled
for deletion, then persisted before flushing. In such a case, the entity
was removed from the unit of work identity map and no reference was
hold. This could lead to spl_object_hash collisions, and prevent
another, new entity to be persisted later.

This fix makes sure the unit of work identity map holds a reference to
the entity after it has been soft-deleted.
2015-03-17 22:19:10 +00:00
Marco Pivetta
40c41857e8 #1333 - Removing unused is_string() function call and cast (always a string) 2015-03-17 21:12:20 +00:00
Marco Pivetta
d6687e070e #1333 - Removing useless is_string() function call, clarifying docblock parameters 2015-03-17 21:11:43 +00:00
Stefano Torresi
2bdc1142fe add string casting to id hashes 2015-03-17 21:08:06 +00:00
Jeroen Thora
a409e7591d Changed some wrong usage of the @internal phpdoc 2015-03-15 16:53:34 +01:00
Marco Pivetta
2a99d5a19b #1113 - minor CS fixes (spacing/alignment) 2015-02-16 01:02:56 +00:00
Asmir Mustafic
8eea7c86f7 Resolve association entries on multi get cache 2015-02-16 00:53:48 +00:00
Asmir Mustafic
2eb7dedf4f Refactored IdentifierFlattener 2015-02-16 00:53:46 +00:00
Marco Pivetta
d952077d04 #1272 DDC-2704 - using the property getter utility rather than metadata API when fetching reflection properties for a class 2015-01-24 14:30:40 +01:00
Marco Pivetta
8910c2c482 DDC-2704 - data should be merged only into initialized proxies 2015-01-24 13:22:16 +01:00
Marco Pivetta
0a3d6966d6 DDC-2704 - providing hotfix - also storing inherited transient properties in the class metadata 2015-01-24 13:22:15 +01:00
Guilherme Blanco
2418f8f5e6 Removed todo by implementing it. 2015-01-18 22:21:18 -05:00
Marco Pivetta
b1d7a057fd #1228 DDC-3490 - avoid catching unknown exceptions, remove unused method call 2015-01-18 01:05:36 +01:00
Marco Pivetta
d0c0f43c79 #1228 DDC-3490 - preventing invalid association values from being persisted 2015-01-18 00:53:57 +01:00
flip111
d1a2655090 Update UnitOfWork.php
rename duplicate method
2015-01-18 00:16:10 +01:00
flip111
059c33e69d Update UnitOfWork.php
removed one `)` too many
2015-01-18 00:16:10 +01:00
flip111
1ae153d315 Update UnitOfWork.php 2015-01-18 00:16:10 +01:00
flip111
88e071d22d moved exception constructors out of UoW 2015-01-18 00:16:09 +01:00
flip111
00a2c8e09c improved error handling for invalid association values
Possibly to do:
1. Make custom Exception for line 713
2. Make custom Exception for line 817
3. Does the object check on line 816 slow down the code too much? Alternatively a try-catch could be put around line 1415 or higher up.
2015-01-18 00:16:09 +01:00
Marco Pivetta
57ce6ccfcf #1172 - fixed minor CS issues (spacing) 2015-01-16 22:54:30 +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
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
fc72b41953 #1240 DDC-3479 - Using a static proxy constructor rather than the default constructor 2015-01-13 02:51:47 +01:00