1
0
mirror of synced 2024-12-12 22:36:02 +03:00
Commit Graph

390 Commits

Author SHA1 Message Date
Benjamin Eberlei
17809abd29 Merge pull request #837 from mnapoli/DDC2775
DDC-2775 Tests and fix
2014-01-02 14:07:14 -08:00
Benjamin Eberlei
ea84cfbdd1 Merge pull request #845 from flack/avoid-update-on-delete
Don't compute changeset for entities that are going to be deleted
2014-01-02 13:59:25 -08:00
Benjamin Eberlei
3a8aaea14a Merge pull request #794 from stefankleff/patch-1
Multiple invokation of listeners on PreFlush event
2014-01-02 13:16:21 -08:00
Matthieu Napoli
c9791fe97f Inlined the model for the DCC2775 test case inside the test class 2013-12-23 09:55:10 +01:00
fabios
cf4c805427 Fix cache misses using one-to-one inverse side 2013-12-20 15:37:07 -05:00
Fabio B. Silva
61bff7d5f6 Fix CS and update docs 2013-12-16 11:05:04 -05:00
fabios
1bfa8f0fc3 Extract cache config 2013-12-16 11:05:04 -05:00
Fabio B. Silva
3140593e9b Second level cache 2013-12-16 11:05:04 -05:00
Pouyan Savoli
a5b7069fd7 [DDC-2645] Apply patch to fix issue 2013-12-15 23:31:35 +01:00
flack
ffd858b238 Merge remote-tracking branch 'upstream/master' into avoid-update-on-delete 2013-11-17 11:36:06 +01:00
flack
9807718100 Also skip entities scheduled for deletion when committing multiple entities 2013-11-17 11:31:21 +01:00
flack
9016a5a854 don't compute changeset for entities that are going to be deleted 2013-11-12 00:11:50 +01:00
Matthieu Napoli
e018bb83f0 [DDC-2775] Bugfix 2013-11-04 12:42:23 +01:00
Peter Kokot
dca09148ca CS fixes 2013-09-22 02:12:30 +02:00
Stefan Kleff
1ec5632a18 Multiple invokation of listeners on PreFlush event
Only lifecycle callbacks and entity listeners should be triggered here. The preFlush listener event is already triggered at the beginning of commit()
2013-09-19 12:13:12 +02:00
Benjamin Eberlei
b6e624b6bf Delete some very old, leftover code. 2013-09-11 22:43:38 +02:00
Guilherme Blanco
e0fd377828 Removed ticket that was breaking the build. DDC-2524 is a circular dependency that is impossible to be fixed with our current codebase. 2013-08-03 19:03:10 -04:00
Benjamin Eberlei
29d6da0fa0 Merge pull request #703 from shulcsm/patch-1
Clear visitedCollections
2013-06-30 01:38:02 -07:00
Benjamin Eberlei
a91050e7f4 [DDC-2350] Eager Collections are not marked as initialized, leading to multiple queries being executed. 2013-06-25 19:34:12 +02:00
shulcsm
3340234785 Clear visitedCollections
Visited collections are cleared only in commit(). Commit clears up only if it actually has something to do. Processing large amounts of records without changing them cause visitedCollections to grow without any way of clearing.
2013-06-19 16:34:44 +03:00
Benjamin Eberlei
5e19e1bed3 [DDC-2267] Allow EntityManager#flush($entity) to be called on entities scheduled for removal. 2013-05-04 13:38:30 +02:00
Benjamin Eberlei
131164b7f6 [DDC-1984] Throw exception if passing null into UnitOfWork#lock() - which can happen when EntityManager#find() tries to lock entity that was just deleted by another process. 2013-05-01 19:39:21 +02:00
Benjamin Eberlei
640a8e58c7 [DDC-2106] Fix entity as parameter value when its managed but not yet with identifier. 2013-05-01 18:46:41 +02:00
Benjamin Eberlei
6505c96ec4 Simplify condition of previous commit (5cdc73e) 2013-05-01 10:58:44 +02:00
Fabio B. Silva
5cdc73e13b Fix DDC-2409 2013-04-28 16:54:44 -03:00
Benjamin Eberlei
52b2e066c5 Merge pull request #611 from stefankleff/fix-eagerloading
Fixed typo in hints. Caused slow loading of eager entities.
2013-04-14 00:43:42 -07:00
Stefan Kleff
e561f47cb2 Added constant 2013-04-08 11:27:22 +02:00
Pascal Borreli
30b050b44c Fixed typos 2013-04-06 14:31:27 +00:00
Pascal Borreli
a2cd0f5804 Fixed typos 2013-03-11 00:08:58 +00:00
Guilherme Blanco
d5dd7d6f8a Merge pull request #589 from Ocramius/hotfix/DDC-2230
Hotfix for DDC-2230
2013-02-25 21:59:04 -08:00
Marco Pivetta
350fa4f15b Applying fix for failing test for DDC-2230 2013-02-23 01:45:40 +01:00
Marco Pivetta
a5ece5063a Fixing DDC-2306 2013-02-21 02:24:48 +01:00
Marco Pivetta
a58d4ae462 Cleaning up logic of the proxy factory by moving closure generation to own private methods 2013-02-14 10:52:13 +01:00
Marco Pivetta
271f5cf033 Adding fix and tests for DDC-1734 2013-02-14 09:57:12 +01:00
Marco Pivetta
8272ffd23f Proxy generation as of doctrine/common#168 - DCOM-96 2013-02-14 09:57:12 +01:00
Marco Pivetta
f281dbbf54 Fixing incorrect constructor params for PreFlushEventArgs 2013-02-04 20:46:51 +01:00
Fabio B. Silva
46fea51622 use '!==' instead of '!=' 2013-01-29 12:14:53 -02:00
Fabio B. Silva
6d7b3863b5 Use bitmask of subscribed event systems. 2013-01-29 12:14:53 -02:00
Fabio B. Silva
0d0f91a807 move listeners invocation from ClassMetadataInfo to ListenerInvoker 2013-01-29 12:14:53 -02:00
Fabio B. Silva
a01d6583d3 implements a entity listener resolver 2013-01-29 12:14:52 -02:00
Fabio B. Silva
27745bb87b Fix some CS 2013-01-29 12:14:52 -02:00
Fabio B. Silva
c6adcda567 give event to lifecycle callbacks 2013-01-29 12:14:52 -02:00
Fabio B. Silva
315f7ba43b call listeners in UoW 2013-01-29 12:14:51 -02:00
Benjamin Eberlei
5298c03fce [DDC-2246] Fix bug with UnitOfWork#getEntityState() and entities with foreign identifier. 2013-01-20 20:11:08 +01:00
Stefan Kleff
dc925cc9c5 fixed indentation
Restored old way of injection to just inject it during a refresh
Added injection for initialized proxies
2013-01-10 15:19:44 +01:00
Stefan Kleff
151192ae37 The EntityManager was not injected in uninitialized proxys which are ObjectManagerAware.
I ran into that problem while I had two objects in the identitymap while hydrating a collection: one was new a "real" entity and the other one was an uninitialized proxy. For "real" entities the em is injected in line 2427, for new entities it is injected in 2436->2364, but for proxies this is missing. According to the comment "inject ObjectManager into just loaded proxies." the code in line 2427 should do this, but in fact it is just used if it is a "real" entity or an already initialized proxy. Moving the injection to outside of the condition in line 2411 (if the entity is an unitialized proxy) solves this.
2013-01-10 14:54:52 +01:00
Francesc Rosàs
1e669132c2 No huge if clause 2013-01-06 19:05:46 +01:00
Francesc Rosàs
9322ca7052 Ensure onFlush and postFlush events are always raised 2013-01-06 19:05:46 +01:00
Benjamin Eberlei
e319e34783 Merge pull request #528 from BenMorel/master
Documentation fixes
2012-12-23 12:22:09 -08:00
Patrick Schwisow
0b21046fce [DDC-1690] Added an empty line as requested. 2012-12-21 15:35:32 -06:00
Patrick Schwisow
5627993827 Fix DDC-1690
Added the lines suggested by the original reporter.
2012-12-20 15:31:46 -06:00
Benjamin Morel
7869ec714d Fixed unused 'use' statements.
Fixed missed documentation issues in Doctrine\ORM
2012-12-13 18:19:21 +00:00
Benjamin Morel
dacdd6cd89 Documentation (docblock) fixes. 2012-12-01 16:28:06 +00:00
Fabio B. Silva
a09a5b9b7b Fix DDC-2084 2012-11-05 22:23:44 -02:00
Jasper N. Brouwer
0cfc37d757 Prevented "Undefined index" notice when updating
While executing updates on an entity scheduled for update without
a change-set, an "Undefined index" notice is raised.
2012-10-17 21:50:09 +02:00
jakoch
d4a6c488ca fixed use statements 2012-10-12 13:53:20 +02:00
Thomas Rothe
7beffb5a5f Several fixes for comments
updated @param and @throws annotations
2012-09-06 21:03:26 +02:00
Benjamin Eberlei
18d4a2f970 [DDC-1775] Fix NotifyPropertyChanged Listener being attached in addIdentityMap(), which is too late for certain use-cases in the persist lifecycle. 2012-07-07 17:47:29 +02:00
Benjamin Eberlei
1023af6a1f [DDC-1861] Fix UnitOfWork#doMerge() 2012-07-04 21:55:59 +02:00
Benjamin Eberlei
70458b2f48 LGPL => MIT 2012-05-26 14:37:00 +02:00
Marco Pivetta
cb7a77cc03 Removing usage of ClassUtil where not strictly needed
Optimizing the ClassMetadataFactory API instead and using ClassMetadata to check actual class names as da962f2e and c27b4de0 introduced too much overhead
2012-04-07 18:53:34 +02:00
Marco Pivetta
c4a2eaea49 Adding additional missing calls to classutils instead of get_class 2012-04-07 18:53:34 +02:00
Marco Pivetta
cbe4987e18 Using Doctrine\Common\Util\ClassUtil for class_name resolutionThis avoids exceptions when passing a Proxy instance to the public API of the EntityManager, ClassMetadataFactory or UnitOfWork when the Proxy itself isn't generated by the EntityManager itself, while discovering the correct ClassMetadata instance for the proxy 2012-04-07 18:53:33 +02:00
Jonathan H. Wage
24e808844b Allow flushing of many entities by passing an array of entities. 2012-03-15 17:45:25 -05:00
Klein Florian
ac1ffaf7e9 make merge copy non persited properties too 2012-03-12 23:18:56 +01:00
Benjamin Eberlei
9cddaf3075 Merge pull request #256 from F5/many_to_many_listeners
When using a ManyToMany relationship no listener is notified about any change to the owning entity
2012-03-03 13:13:09 -08:00
Benjamin Eberlei
35764c2402 [DDC-1659] Remove read only marker when clearing entities. 2012-02-20 09:36:35 +01:00
Benjamin Eberlei
9fc1d85e8d [DDC-1643] Fix bugs when cloning PersistentCollection and re-using it. 2012-02-18 00:42:21 +01:00
Benjamin Eberlei
d995c6dbdc [DDC-1655][DDC-1650][DDC-1556] Fix issues with @postLoad Callback being not fired, or fired multiple times. 2012-02-17 23:27:16 +01:00
Benjamin Eberlei
6c24251452 [DDC-1612] Fix bug with EntityManager#flush($entity) on new entities. 2012-01-21 13:06:30 +01:00
Guilherme Blanco
74f3ed7e29 Fixing CS. 2012-01-18 23:27:28 -05:00
Guilherme Blanco
b98280a504 Quick optimizations are always good. 2012-01-18 23:09:23 -05:00
Benjamin Eberlei
56ea4872ca DDC-1594 - Fix problem with merge and an existing managed proxy instance. 2012-01-15 15:48:44 +01:00
Benjamin Eberlei
36ce26691d DDC-1585 - Throw exception if setting target entity of the wrong type to an assocation. 2012-01-15 14:59:20 +01:00
Francisco Facioni
e7a6d87990 When using a ManyToMany relationship no listener is notified about any change to the owning entity.
What I'm doing with this patch is marking the entity for update when there is a modification in the ManyToMany relationship so the listeners are notified about it.

The main reason for this is for hooking up services like Solr or other indexers to update the entities even for ManyToMany relationships.
2012-01-12 14:38:07 -03:00
Benjamin Eberlei
f6f2acad4c Merge Improve Error Messages into 2.2 2011-12-21 23:56:25 +01:00
Benjamin Eberlei
b1b10042d2 Revert "Fixed issue with fetched association not being considered during changeSet calculation. Fixes DDC-1545."
This reverts commit a8478d5766.
2011-12-19 16:31:26 +01:00
Guilherme Blanco
a8478d5766 Fixed issue with fetched association not being considered during changeSet calculation. Fixes DDC-1545. 2011-12-19 01:39:48 -05:00
Benjamin Eberlei
e8a47b3921 DDC-1519 - Fix bug in merging of entities that contain foreign identifiers 2011-12-15 20:49:25 +01:00
Benjamin Eberlei
99e46a23c6 Bugfix in UnitOfWorklib/Doctrine/ORM/UnitOfWork.phptriggerEagerLoads() 2011-12-13 21:26:04 +01:00
Andrew Mackrodt
2fdb55a878 Added absolute namespace paths to phpdoc annotations - issue DDC-1025. 2011-12-11 21:56:26 +00:00
Guilherme Blanco
954b5077e4 Fixed nesting recursion error in some situations. Complement to DDC-1276. 2011-12-09 10:59:53 -05:00
Guilherme Blanco
a26990c3e8 DDC-1457: Fixed wrong docblock. 2011-12-04 02:14:47 -05:00
Guilherme Blanco
5e3e8b3957 More refactorings and optimizations. 2011-12-01 10:00:26 -05:00
Guilherme Blanco
24f6b74427 Refactored UnitOfWork::createEntity, improving its performance. 2011-11-29 10:36:32 -05:00
Benjamin Eberlei
f2f32ca70f DDC-1509 - Fix regression in doMerge() introduced with the DDC-1383 bugfix 2011-11-28 10:04:33 +01:00
Guilherme Blanco
ef33454301 Reverted PR which broke suite. Issue is still valid, but it requires more investigation. 2011-11-23 08:40:47 -05:00
Jonathan Ingram
248c9bdeff Fixed typo 2011-11-21 12:34:20 +11:00
Benjamin Eberlei
bda593a66d DDC-1448 - Add support for ObjectManagerAware interface and PersistentObject in ORM 2011-11-19 13:06:24 +01:00
Benjamin Eberlei
34c94dbd94 DDC-1452 - Fixed bug with multiple fetch joins of the same "propery-path" of Class+field name combinations 2011-11-14 23:05:33 +01:00
Benjamin Eberlei
6520211df3 Merge everzet/PreFlush-event 2011-11-13 16:51:23 +01:00
Alexander
1f55351f19 Cleanup 2011-11-10 16:16:55 +01:00
Alexander
9c9f85ed4b Only refresh the given entity if an entity is specified in the query hints 2011-11-09 22:52:48 +01:00
Guilherme Blanco
32b8d77580 Fixed CS issues. More tiny optimizations in UnitOfWork. 2011-11-07 01:27:20 -02:00
Guilherme Blanco
96aa25fb3e Optimized more pieces of code in UnitOfWork. 2011-11-06 02:03:34 -02:00
Guilherme Blanco
ea69d9ca0c Fixed wrong optimization. Optimized more pieces of code in UnitOfWork. 2011-11-05 19:21:35 -02:00
Guilherme Blanco
c6a3ff4da5 Optimizations in UnitOfWork. 2011-11-05 03:09:14 -02:00
everzet
9c4c06c422 optimized PreFlush (moved into computeChangeSet function) 2011-11-03 16:24:47 +02:00
Guilherme Blanco
3cfa479c01 Micro optimization in computeChangeSet when using readOnly entities. 2011-10-30 15:46:07 -02:00
Guilherme Blanco
c5ef21864f Fixed bug with fetch=EAGER associations that have already been hydrated during querying. 2011-10-26 15:04:49 -02:00