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
everzet
66e2a9260e
added PreFlush lifetime event and lifecycle callback
2011-10-23 18:39:16 +03:00
Benjamin Eberlei
9b8d2d512b
Merge pull request #168 from dfreudenberger/master
...
postFlush event implementation
2011-10-23 01:12:27 -07:00
Benjamin Eberlei
5d3298e706
DDC-720 - Correct mentioned issues by @asm89
2011-10-23 10:05:46 +02:00
Daniel Freudenberger
fa8000fa5c
dispatch the event after the snapshot was taken
2011-10-23 01:27:09 +02:00
Daniel Freudenberger
46a3fecb4f
added the postFlush event
2011-10-22 18:38:51 +02:00
Benjamin Eberlei
f569a2a389
DDC-720 - Add support to flush only one entity (within cascade rules) through EntityManager#flush()
2011-10-22 13:44:33 +02:00
Benjamin Eberlei
719e05e53e
Extract more messages into ORMInvalidArgumentException
2011-10-22 12:57:55 +02:00
Benjamin Eberlei
a8906ce572
Stringify entity in all UnitOfWork exceptions
2011-10-22 12:49:33 +02:00
Benjamin Eberlei
5392737de4
Improved and extracted UnitOfWork error messages
2011-10-22 12:40:12 +02:00
Benjamin Eberlei
dba8360166
Merge master into ImproveErrorMessages
2011-10-22 11:06:51 +02:00
Benjamin Eberlei
939fbf9c24
DDC-1278 - Clean up event handling of new clear functionality.
2011-10-16 22:45:06 +02:00
Benjamin Eberlei
22a04fd6de
Merge dominikl/DDC-1278 into doctrine/DDC-1278
2011-10-16 22:41:16 +02:00
Benjamin Eberlei
4474d305cb
DDC-1210 - Optimize UnitOfWork collection handling internally.
2011-10-15 21:47:16 +02:00
Benjamin Eberlei
b6c49863e8
Merge branch 'master' of github.com:doctrine/doctrine2
2011-10-15 19:14:53 +02:00
Benjamin Eberlei
08716d9f72
DDC-1383 - Proxy Generation in merge was flawed with inheritance
2011-10-15 19:14:30 +02:00
Benjamin Eberlei
73101be422
Merge pull request #143 from craue/patch-2
...
added missing type hint
2011-10-15 10:05:53 -07:00
Benjamin Eberlei
6f3667201c
Add @ignore and @internal to UnitOfWork#computeChangeSet
2011-10-15 18:11:14 +02:00
Benjamin Eberlei
cb21f3c5ff
DDC-1414 - Missing push to $newNodes
2011-10-15 17:47:09 +02:00
Benjamin Eberlei
cb28bfd484
Improve Error Messages in ClassMetadata and UnitOfWork
2011-10-15 17:38:55 +02:00
Benjamin Eberlei
dd6f6cb097
Fix notice
2011-10-15 16:03:50 +02:00
Benjamin Eberlei
640facd26a
Remove unncessary line
2011-10-15 15:51:11 +02:00
Benjamin Eberlei
3801e0c230
Add way to keep track of read only objects in the UnitOfWork which are never updated during flush.
...
Changed the behavior of EntityManager#getPartialReference to be read-only. No changes are ever
done to this entities. Changed UnitOfWork#computeChangeSet to never create a changeset for
fields that are partially omitted from a DQL or NativeQuery.
To check if an entity is read only use the new API:
if ($entityManager->getUnitOfWork()->isReadOnly($entity))
2011-10-15 15:42:02 +02:00
Christian Raue
689aaef4dc
added missing type hint
2011-10-10 09:44:17 +03:00
Benjamin Eberlei
9f96d4a31a
DDC-1392 - Fix bug with merging unitialized proxies
2011-09-25 18:08:41 +02:00
Guilherme Blanco
e3d133af04
Added getQuotedTableName() in missing places of Doctrine ORM. Fixes DDC-1365.
2011-09-07 01:48:19 -03:00
Benjamin Eberlei
b145f061c9
DDC-1348 - Fix bug with UnitOfWork::getEntityState()
2011-08-28 15:58:08 +02:00
Benjamin Eberlei
e6a73803a4
Merge branch 'DDC-1306'
2011-08-27 20:44:15 +02:00
Benjamin Eberlei
3b4b38e184
DDC-1306, DDC-1113 - Fix issues with inheritance and commit order
2011-08-27 20:41:52 +02:00
Benjamin Eberlei
8c2db89f2b
DDC-1340 - Fix bug with merge() and optimistic lock exception
2011-08-21 15:01:57 +02:00
Dominik Liebler
6e47d7b16d
DDC-1278 - EntityManager::clear($entity) support
...
added test case and modified test data CmsUser to cascade detach address and articles (testing collections and single entites)
2011-08-14 16:12:12 +02:00
Dominik Liebler
25f5ff0ca1
DDC-1278 - EntityManager::clear($entity) support
...
cascade detach operation only on entity name entities
2011-08-13 20:22:23 +02:00
Dominik Liebler
745535d269
fixed typo
2011-08-12 20:15:32 +02:00
Dominik Liebler
05fb0b913a
DDC-1278 - EntityManager::clear($entity) support
...
added new parameter $entityName for UnitOfWork::clear()
removed not implemented exception in EntityManager:clear()
2011-08-11 23:03:26 +02:00
Benjamin Eberlei
a99ffc126f
DDC-1276 - Fix bug where merge managed and new entitiy share the same collection that is cascaded, cleared during the process and then empty afterwards.
2011-07-26 22:15:27 +02:00
Benjamin Eberlei
2858b8290f
DDC-1238 - Fixed a bug introduced when refactoring persisters hydration. This occurs when you call $em->clear() and you start accessing a proxy.
2011-07-04 23:19:08 +02:00
Benjamin Eberlei
66e92b147d
Minor spelling mistake, thanks Alexandre Mathieu for reporting
2011-06-28 22:30:17 +02:00
Benjamin Eberlei
551f6d05d9
DDC-1230 - Fix bug where UnitOfWork does not set STATE_REMOVE when calling EntityManager#remove() on an entity
2011-06-28 21:37:53 +02:00
Benjamin Eberlei
a73a1e8437
DDC-1226, DDC-1228 - Bugfix with refereshing proxy references not setting the originalEntityData.
2011-06-25 14:38:44 +02:00
Benjamin Eberlei
decd1482de
Fix bug in ChangeTrackingNotify code
2011-06-18 23:06:07 +02:00
Benjamin Eberlei
32b146ea8a
Switch testsuite to run with phpunit.ini.dist from main folder, not using AllTests approach. Fixed global state problem in tests that was caused by EventManager being reused. Significantly enhanced error message about cascade persist
2011-06-18 22:47:21 +02:00
Benjamin Eberlei
4371e8fab0
DDC-1163 - Fix nasty bug with inheritance in UnitOfWork::executeUpdates() and executeRemovals()
2011-06-05 16:21:23 +02:00
Benjamin Eberlei
ddb647f39f
DDC-1173 - Fix bug when calling UnitOfWork::clearEntityChangeSet() in listener
2011-06-05 13:34:07 +02:00
Benjamin Eberlei
bda4165bf8
DDC-1193 - Fix previous commit.
2011-06-05 10:02:57 +02:00
Benjamin Eberlei
acaf08d4b7
DDC-1193 - Fix bug with cascade remove and proxy classes.
2011-06-05 09:59:16 +02:00
Benjamin Eberlei
875912bffd
DDC-733 - Add UnitOfWork::initializeObject() method.
2011-06-05 08:44:38 +02:00
Benjamin Eberlei
d4569baa11
[DDC-1129] Fix bug in version changeset computation aswell as inline ClassMetadata::isCollectionValuedAssociation to increase performance by 2-5%
2011-05-01 11:44:31 +02:00
Benjamin Eberlei
7a068c206e
DDC-1043 - Make computeChangeSet() algorithm more strict, possible leading to more updates to to values that are not exactly the same. However this is necessary to avoid bugs with certain PHP casting rules, i.e. +44 = 44
2011-05-01 10:21:47 +02:00
Benjamin Eberlei
9a75277dd4
[DDC-692] Add ClassMetadataInfo::isReadOnly flag and ignore these entities in Change Tracking.
2011-03-29 20:04:14 +02:00
Michael Ridgway
1f50dee8a8
DDC-696: Added onClear event
2011-03-21 23:17:08 -04:00
Benjamin Eberlei
5192306d39
[DDC-952] One last commit with some refactorings, additional comments and two new tests. Also added convenience method Query::setFetchMode($className, $assocName)
2011-03-16 22:51:32 +01:00
Benjamin Eberlei
4b98e3ea8e
DDC-952 - Remove unnecessary instance variable and comment on one feature.
2011-03-16 00:03:43 +01:00
Benjamin Eberlei
8794d35867
DDC-952 - Woah this still needs tons of tests.
2011-03-09 23:30:35 +01:00
Benjamin Eberlei
077ae9cee9
[DDC-914] Fetch join many-to-one/one-to-one associations configured as FETCH_EAGER inside the persisters.
2011-03-09 23:14:54 +01:00
Benjamin Eberlei
fd502631c7
DDC-734 - REname query hint to fetchEager.
2011-03-08 22:28:55 +01:00
Benjamin Eberlei
60eb755fe9
DDC-952, DDC-734 Add DQL query hint to switch associations from lazy to eager for deferred initialization optimizations.
2011-03-08 22:22:54 +01:00
Benjamin Eberlei
112f9d1480
[DDC-1050] Change refresh of collection back
2011-03-06 21:49:02 +01:00
Benjamin Eberlei
851f44a066
[DDC-952] [DDC-1050] Use ObjectHydrator inside Persisters, removing a bunch of duplicate code (step1, more necessary)
2011-03-06 21:26:54 +01:00
Benjamin Eberlei
03630df20d
Add support for IN(?) queries in repositories using the DBAL support for parameter lists.
2011-03-06 11:15:56 +01:00
Benjamin Eberlei
3d37e436dd
DDC-952 - Refactor eager loading entities, it is only allowed for non composite primary key entities.
2011-03-05 11:09:38 +01:00
Benjamin Eberlei
32df9451fd
DDC-952 - Implemented first approach for batching eager loads of ToOne associations.
2011-03-05 11:08:41 +01:00
Benjamin Eberlei
65bbdc30de
DDC-978 - Fix bug where Collection gets cleared (again) when calling flush multiple times and replacing a PersistentCollection with a new one.
2011-01-23 15:40:16 +01:00
Benjamin Eberlei
c998797c55
DDC-546 - Add Extra Lazy Collection prototype.
2011-01-02 12:44:16 +01:00
Benjamin Eberlei
194a90923d
DDC-117 - Finalize patch, fix all the problems of different use-cases by hugely expanding the test-model.
2011-01-01 18:17:19 +01:00
Benjamin Eberlei
e7b4dca611
Merge master into DDC-117
2010-12-28 17:27:47 +01:00
Benjamin Eberlei
4f154b6aa1
DDC-920 - Fix bug when detaching a managed entity that is not yet in the identity map (no id).
2010-12-10 21:55:48 +01:00
Benjamin Eberlei
634aa0b291
DDC-832 - Small adjustments in the patch
2010-10-31 11:11:23 +01:00
Benjamin Eberlei
008601f2ea
DDC-758 - Respect notify change tracking.
2010-10-31 07:23:58 +01:00
Benjamin Eberlei
23795605fc
DDC-758 - Fix bugs with adding and removing elements from a cascade merge Collection. This fix leads to a significant hit in merge performance of collections since they have to be initialized to the current database state, leading to an additional sql query being executed + hydration.
2010-10-31 07:06:53 +01:00
Benjamin Eberlei
89d0a52c4f
DDC-833 - Fix some nasty bug occouring when re-creating an entity that was a proxy before. Also found another nasty issue with refreshing entity that had an already loaded many-to-many or one-to-many association.
2010-10-11 22:15:18 +02:00
Benjamin Eberlei
7551bb3762
Fix notice due to wrong variable reference
2010-10-06 23:09:49 +02:00
Benjamin Eberlei
da63bad9c8
DDC-762 - Fixed notice when mapping foreign keys to field having null values
2010-09-13 21:48:25 +02:00
Benjamin Eberlei
1496250833
Merge branch 'master' into DDC-117
2010-08-15 20:17:56 +02:00
Benjamin Eberlei
6f4f8f8cb1
DDC-742 - Fix issue with collections that are set to fetch=EAGER not being initialized with takeSnapshot() correctly
2010-08-15 19:51:06 +02:00
Benjamin Eberlei
e45c52b024
Merge Removal of association classes into DDC-117 branch, quite some merge efforts necessary to get it working again
2010-08-13 23:23:11 +02:00
Roman S. Borschel
dd7be5b13a
Improving API and docblocks. Removing superfluous tests.
2010-08-09 22:48:07 +02:00
Roman S. Borschel
4826739824
Simplified ClassMetadata lookup in UnitOfWork and added docblock.
2010-08-09 22:48:07 +02:00
Roman S. Borschel
8d3e0e61ea
Moved association mappings to plain arrays, just like field mappings.
2010-08-09 22:48:07 +02:00
Benjamin Eberlei
a705b81d9b
DDC-729 - Fix issue with merging of collections leading to dereference behaviour after next flush(). Added a test for dereferencing of collections as there was none
2010-08-08 16:07:40 +02:00
Benjamin Eberlei
7b07a17886
Merge branch 'master' into DDC-117
2010-08-08 14:07:24 +02:00
Roman S. Borschel
a1bf4dc4f6
API doc adjustments.
2010-08-08 13:10:53 +02:00
Roman S. Borschel
34262aeae1
Removed support for experimental C extension. Will be re-examined for 3.0.
2010-08-08 12:52:46 +02:00
Roman S. Borschel
3630e06b84
[DDC-522][DDC-419][DDC-383] Fixed.
2010-08-08 12:40:32 +02:00
Benjamin Eberlei
251247c16f
DDC-633 - Fix Eager ManyToOne or OneToOne relations being replaced by a proxy instead.
2010-08-08 11:05:30 +02:00
Benjamin Eberlei
10f47389ae
Made single identifier One-To-One + Id work also and added a test-case
2010-08-07 20:07:10 +02:00
Benjamin Eberlei
c697a2d47f
Prototype hack of @ManyToOne + @Id support with two test-scenarios, composite association key only composite key, and a mixed key scenario. I think single foreign association would work also
2010-08-07 19:33:54 +02:00
Roman S. Borschel
29bf4adac7
Fixed merging issue with sequence identifiers.
2010-08-07 11:33:33 +02:00
Roman S. Borschel
a25101add1
Fixed merging with NOTIFY policy.
2010-07-30 17:19:51 +02:00
Roman S. Borschel
69073c4b37
Fixes for merging bidirectional associations where both sides define cascade=merge as well as fixes for handling null values and proxies properly in single-valued associations.
2010-07-30 17:19:50 +02:00
Roman S. Borschel
954a8c3935
Updated tests.
2010-07-30 17:19:50 +02:00
Benjamin Eberlei
c217b33c45
DDC-714 - Bug in refactored persistNew() functionality leads to failure with pre-persist id generators
2010-07-25 16:32:04 +02:00
Roman S. Borschel
a05003016b
Stricter detection of the NOTIFY policy.
2010-07-16 11:16:06 +02:00
Roman S. Borschel
e7ac35ed95
[DDC-119] Fixed.
2010-07-15 15:55:45 +02:00
Benjamin Eberlei
d288e99a34
DDC-681 - Fix call to wrong function, need field not column names in lock()
2010-07-10 19:23:38 +02:00
Roman S. Borschel
4212b88edc
Fixed DDC-455, DDC-600. Some behavior and API polish in the UoW as well as continued _ prefix removal in some core classes. Cleanups and fixes for one-to-one orphan removal including tests.
2010-07-08 00:20:54 +02:00
Roman S. Borschel
88b0813536
Improved entity state detection.
2010-07-06 11:43:14 +02:00