1
0
mirror of synced 2024-12-14 15:16:04 +03:00
Commit Graph

1130 Commits

Author SHA1 Message Date
Alexander
2ddfc6af5a Fixed failing tests in PHPUnit 3.6.2 (expecting \Exception was deprecated) 2011-11-09 08:20:35 +01:00
Benjamin Eberlei
3914e4a5d0 Merge pull request #184 from asm89/InvalidFetchMode-exception
Throw exception on invalid fetch mode in annotations
2011-11-08 01:28:32 -08:00
Benjamin Eberlei
cce3798b4b Merge pull request #183 from asm89/ProxyIdentifier-types
Proxy identifier type casting
2011-11-08 01:27:30 -08:00
Alexander
e99b800406 Throw exception on invalid fetch mode in annotations 2011-11-08 10:01:22 +01:00
Alexander
6707129a3e Added type casts to 'non-lazy' identifiers in proxies. 2011-11-08 09:43:06 +01:00
Benjamin Eberlei
793a1032e6 Merge pull request #182 from asm89/innerjoin-fetch-eager
Eagerly fetched entities should only be inner joined if they are loaded
2011-11-03 03:58:21 -07:00
Alexander
ca438fa110 Eagerly fetched entities should only be inner joined if they are loaded
from the owning side.
2011-11-03 09:20:41 +01:00
Guilherme Blanco
3c31d88810 Major optimizations in SqlWalker code, reducing overhead, reducing lookahead checks. 2011-11-03 02:44:50 -02:00
Guilherme Blanco
058242fa27 Fixed missing changes. 2011-11-03 02:37:54 -02:00
Benjamin Eberlei
d532de9da3 Fix docblocks ObjectHydratorTest 2011-11-01 17:43:23 +01:00
Benjamin Eberlei
c38d273c1f Merge pull request #151 from doctrine/DDC-1385
DDC-1385
2011-10-31 15:10:54 -07:00
Alexander
53386e5247 Merge branch 'master' into innerjoin-on-fetch-eager
Conflicts:
	lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
2011-10-31 22:24:16 +01:00
Alexander
22b3b46b61 Removed unnecessary spaces in generated SQL 2011-10-31 22:08:40 +01:00
Alexander
0f938b8c1d Added tests for inner join generation with eager loading 2011-10-31 21:53:46 +01:00
Alexander
3994b80aa4 Fix TODO: Inner join when all join columns are NOT nullable. 2011-10-31 21:36:55 +01:00
Benjamin Eberlei
1dc5b7fba4 DDC-1462 - Fix bug in slice when calling on a dirty collection that is marked extra lazy 2011-10-31 21:34:22 +01:00
Benjamin Eberlei
95193ab5f8 DDC-1399 - Fix extra lazy collections when inner collection contains values but persistent collection is marked not dirty because of flush() 2011-10-31 21:17:01 +01:00
Benjamin Eberlei
11f82bd41f DDC-1439 - Fix validate mapping some more 2011-10-31 20:49:59 +01:00
Benjamin Eberlei
64d405f7dd Merge origin/master into DDC-1384 2011-10-30 12:12:18 +01:00
Benjamin Eberlei
94c288a6a8 Merge branch 'master' of github.com:doctrine/doctrine2 2011-10-30 08:26:03 +01:00
Benjamin Eberlei
2c036b3185 Fix glitch in testsuites tearDown() 2011-10-30 08:25:19 +01:00
Benjamin Eberlei
1bbec8dd33 Clarify error message 2011-10-30 00:25:49 +02:00
Benjamin Eberlei
30731e0727 DDC-1384 - Fix all tests on Oracle 2011-10-29 23:58:09 +02:00
Benjamin Eberlei
50e028212d DDC-1384 - Fix a bunch of Oracle test failures 2011-10-29 20:42:44 +02:00
Benjamin Eberlei
fb55e8094b DDC-1384 - Made tests case-insenstive to work with latest change regarding column sizes 2011-10-29 18:48:34 +02:00
Guilherme Blanco
0ec2cc557f Implemented support to entities with association marked as @Id support in many situations. Fixed DDC-1435. 2011-10-29 02:00:35 -02:00
Benjamin Eberlei
7d921a8220 DDC-1452 - Attach working testcase 2011-10-29 00:22:45 +02:00
Guilherme Blanco
3745e948c6 Made SimpleSelectExpression (Literal) be included as a scalar result. More general SQL Walker optimizations. 2011-10-28 14:25:12 -02:00
Guilherme Blanco
1f06e9fca5 Fixed issue with SimpleSelectExpression containing Literals. This issue is related to a previously fixed ticket DDC-1079. 2011-10-28 12:56:14 -02:00
Benjamin Eberlei
f34eb83a7c DDC-1454 - Fix exists() for Joined table inheritance 2011-10-28 00:50:10 +02:00
Benjamin Eberlei
5918058d86 Merge origin/master 2011-10-27 22:36:06 +02:00
Asmir Mustafic
d09285e9d3 Collapse cascade all test (YAML too) 2011-10-26 10:59:15 +02:00
Asmir Mustafic
035ca8e500 Collapse cascade all test 2011-10-26 10:14:59 +02:00
Benjamin Eberlei
cfe7ab46f2 Merge branch 'master' of git://github.com/doctrine/doctrine2 2011-10-25 22:55:08 +02:00
Benjamin Eberlei
3b9312e291 Bump DBAL version and make TestUtil more lenient 2011-10-25 22:54:20 +02:00
Jaik Dean
cdb452b27b Fixed typos of 'discriminator' 2011-10-24 10:01:27 +01:00
Asmir Mustafic
cb76222e63 Collapse cascade persist, remove, refresh, detach, merge into
cascade-all (implemented currently only for XML annotation)
2011-10-24 09:54:31 +02:00
Benjamin Eberlei
adc4840cce DDC-217 - Add support for QueryCacheProfiles and remove the old result caching code from ORM. Deprecate a bunch of methods in favor of using the AbstractQuery#getQueryCacheProfile method. 2011-10-23 23:28:23 +02:00
Alexander
80c9690926 Fix mysql testsuite 2011-10-23 22:06:03 +02:00
Alexander
f1df4ffca4 Fix testsuite 2011-10-23 21:37:29 +02:00
everzet
20ed8869e4 added test for PreFlush lifetime event 2011-10-23 18:41:41 +03:00
Benjamin Eberlei
9b8d2d512b Merge pull request #168 from dfreudenberger/master
postFlush event implementation
2011-10-23 01:12:27 -07:00
Daniel Freudenberger
46a3fecb4f added the postFlush event 2011-10-22 18:38:51 +02:00
Alexander
079e2b1302 [DDC-1384] Fix for generating sql with aliases not longer than MaxIdentifierLength 2011-10-22 16:27:56 +02:00
Benjamin Eberlei
b910a487c5 DDC-720 - Wait, we should really test it only changes the passed entity. 2011-10-22 14:31:23 +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
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
3aea203b9c Throw exception if target entity is not found. 2011-10-22 11:28:07 +02:00
Benjamin Eberlei
dba8360166 Merge master into ImproveErrorMessages 2011-10-22 11:06:51 +02:00
Benjamin Eberlei
23560038b4 Merge branch 'master' of github.com:doctrine/doctrine2 2011-10-22 10:37:32 +02:00
Alexander
07ce4092cd Merge branch 'master' into DDC-551 2011-10-21 12:04:29 +02:00
Alexander
b8af241504 Added a testcase for findBy(.. => null) and renamed 'old' testcase 2011-10-17 20:53:04 +02:00
Alexander
91bc9c0329 Adjusted test to verify that findBy*(null) is now supported 2011-10-17 18:56:06 +02:00
Benjamin Eberlei
22a04fd6de Merge dominikl/DDC-1278 into doctrine/DDC-1278 2011-10-16 22:41:16 +02:00
Benjamin Eberlei
8466060797 DDC-1385 - Add INDEX BY scalar variables on the top-level 2011-10-16 19:23:20 +02:00
Benjamin Eberlei
ee924ffaba DDC-1385 - Fix scalar handling for array hydrator 2011-10-16 16:27:50 +02:00
Benjamin Eberlei
cb0e5dbff3 DDC-1385 - Fixed Mixed result hydration using INDEX BY to work on the top-level indexes, not some weird result. This is a BC break to those that actually use this crazy logic, sorry for that :-) 2011-10-16 12:46:17 +02:00
Benjamin Eberlei
0252d55c67 DDC-1358 - Fix bug where multiple NULL root entity combined with scalar results will break the object and array hydrator.
This case likeli only occurs when doing native queries. A guard clause that prevents hydration from breaking
when RIGHT JOIN queries with null root entities appear has been added aswell.
2011-10-16 11:15:45 +02:00
Guilherme Blanco
eeba947ea7 Code optimizations. Fixed unused argument in OrmTestCase as referred in DDC-766. 2011-10-16 02:10:59 -02:00
Guilherme Blanco
33bcf7ad6f Added coverage to DDC-1161. 2011-10-16 01:42:36 -02:00
Benjamin Eberlei
5c78ecaca1 Fix tests in EntityGenerator due to Annotation prefixes 2011-10-15 20:44:25 +02:00
Benjamin Eberlei
7b71b3284d Fix failing test due to EntityGenerator assuming beginning with 2.2 the AnnotationReader is always used. There is still the simple reader though. 2011-10-15 20:41:07 +02:00
Guilherme Blanco
ba38f3e1e9 Merge pull request #148 from asm89/ProxyIdentifer
Do not load entity on retrieving identifier from a proxy
2011-10-15 11:23:06 -07:00
Benjamin Eberlei
08716d9f72 DDC-1383 - Proxy Generation in merge was flawed with inheritance 2011-10-15 19:14:30 +02:00
Alexander
d46352da01 Fixed tests + added dedicated tests for proxy loading and identifiers 2011-10-15 17:58:00 +02:00
Benjamin Eberlei
cb28bfd484 Improve Error Messages in ClassMetadata and UnitOfWork 2011-10-15 17:38:55 +02:00
Alexander
8d1b852aa2 Added tests for not loading the entity + fixed a test 2011-10-15 17:31:09 +02:00
Alexander
f47e1feac6 Merge branch 'master' of git://github.com/doctrine/doctrine2 into ProxyIdentifer
Conflicts:
	lib/Doctrine/ORM/Proxy/ProxyFactory.php
2011-10-15 17:24:13 +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
Benjamin Eberlei
2166a21511 Merge branch 'master' of github.com:doctrine/doctrine2 2011-10-15 11:36:53 +02:00
Benjamin Eberlei
894bbb020c DDC-1394 - Enhance test to verify 2011-10-15 09:57:35 +02:00
Guilherme Blanco
2518f0687c Removed invalid default argument. 2011-10-15 00:21:11 -03:00
Guilherme Blanco
f86e1ba66c Added tests for DDC-1389. Everything is working in 2.2-DEV. 2011-10-15 00:18:57 -03:00
Alexander
097d573d26 Merge branch 'master' into DDC-551
Conflicts:
	lib/Doctrine/ORM/Configuration.php
	lib/Doctrine/ORM/Persisters/BasicEntityPersister.php
	lib/Doctrine/ORM/Persisters/ManyToManyPersister.php
2011-10-14 12:33:39 +02:00
Fabien Potencier
6a72ba5f97 DDC-1418 - Add simplified XML and YAML drivers ported from the Symfony project, thanks Fabien 2011-10-13 23:39:11 +02:00
Benjamin Eberlei
a36a1624fb [DDC-1415] Add EntityEventDelegatee, allowing to restrict emitting events to certain entity classes only. 2011-10-13 22:58:22 +02:00
Benjamin Eberlei
97a6caf059 Update Common to latest to have the current Persistence Interface 2011-10-11 13:22:26 +02:00
Guilherme Blanco
ebe933810e Implemented HIDDEN support in DQL. Fixes DDC-1363. 2011-10-03 02:07:07 -03:00
Guilherme Blanco
80284a273d Merge pull request #133 from FabioBatSilva/DDC-1335
Fixes DDC-1335.

Patch looks perfect to me. @beberlei please merge into 2.1 =)
2011-09-25 14:52:56 -07:00
Benjamin Eberlei
9f96d4a31a DDC-1392 - Fix bug with merging unitialized proxies 2011-09-25 18:08:41 +02:00
Fabio B. Silva
5fe996baf9 change tests for DDC-1135 2011-09-25 12:20:48 -03:00
Fabio B. Silva
728724bed5 fix DDC-1135 2011-09-24 16:16:25 -03:00
Fabio B. Silva
e94b902a9b tests for DDC-1335 2011-09-24 16:10:10 -03:00
Fabio B. Silva
f4c5c4ba01 branch for DDC-1335 2011-09-23 18:10:58 -03:00
Guilherme Blanco
a86038b484 Fixed issue with CaseExpression not working in Subselects. 2011-09-21 17:30:45 -03:00
Alexander
63a3fb5ad8 [DDC-551] Moved SQLFilter logic to a separate FilterCollection class 2011-09-15 21:38:47 +02:00
Guilherme Blanco
918e2d2018 Fixed remaining Doctrine packages upgrade. 2011-09-13 01:14:36 -03:00
Guilherme Blanco
3bb803fd69 Cherry picked FabioBatSilva upgrade of Common lib. 2011-09-13 00:59:24 -03:00
Fabio B. Silva
3707b34cbb Change repository type for EntityRepository 2011-09-08 17:21:06 -03:00
Fabio B. Silva
43ccd9ead6 tests for DDC-753 2011-09-08 15:54:49 -03:00
Fabio B. Silva
19d0887bb0 check if parent class is a mapped superclass 2011-09-08 13:41:16 -03:00
Fabio B. Silva
7f0275155d php mapping 2011-09-08 13:17:53 -03:00
Fabio B. Silva
6a89de51e5 change tests 2011-09-08 12:55:55 -03:00
Fabio B. Silva
54a53b1d03 tests for DDC-869 2011-09-08 11:56:05 -03:00
Fabio B. Silva
f6d34bbb9d Merge remote-tracking branch 'upstream/master' into DDC-869 2011-09-08 11:54:04 -03:00
Guilherme Blanco
a7f3af8328 Added IDENTITY DQL Function. Fixes DDC-1339. 2011-09-08 02:10:48 -03:00
Fabio B. Silva
b2d98495b1 mapping files 2011-09-07 18:29:43 -03:00
Fabio B. Silva
25ecd45fd1 Merge remote-tracking branch 'upstream/master' into DDC-869 2011-09-07 17:27:59 -03:00
Fabio B. Silva
82f7d6cad2 starts work with mapped superclass repository 2011-09-07 17:27:05 -03:00
Guilherme Blanco
bd5393a318 Added coverage for orphanRemoval in OneToOne when unlinking an entity. 2011-09-07 13:12:02 -03:00
Guilherme Blanco
2cfc61db84 Fixed bug with orphanRemoval not removing associated Entity on OneToMany and OneToOne relationships. As defined in ClassMatedataInfo, in these situations, when orphanRemoval=true, cascade=remove is implicit. This fixes DDC-1321. 2011-09-06 01:58:16 -03:00
Guilherme Blanco
6bbf2d9da3 Added support for ResultVariable referencing in ArithmeticPrimary. Fixes DDC-1346. 2011-09-05 03:16:01 -03:00
Benjamin Eberlei
09ac3a9eb2 DDC-659 - Add ClassMetadataBuilder for PHP based metadata management 2011-09-04 14:13:20 +02:00
Benjamin Eberlei
342c3ba941 Initial work on ClassMetdataBuilder 2011-09-04 10:08:33 +02:00
Guilherme Blanco
3b3186ee98 Added support to user provide an array of Entities as a DQL parameter. Fixes DDC-1356. 2011-09-01 19:11:57 -03:00
Benjamin Eberlei
8b38e68e23 DDC-1350 - Bugfixes in Doctrine\ORM\Tools\Setup 2011-08-30 20:40:26 +02:00
Guilherme Blanco
12f46e936c Merge branch 'master' of github.com:doctrine/doctrine2 2011-08-28 13:48:24 -03:00
Guilherme Blanco
e7f471ef3e Fixed issue with CTI during DQL update that was incorrectly setting parameter types during multi table execution. Fixes DDC-1341. 2011-08-28 13:48:15 -03:00
Benjamin Eberlei
0a6709acba Fix tests with regard to repositoryClass handling and applying the default namespace 2011-08-28 16:00:21 +02: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
Alexander
ed0fb4ece7 Merge branch 'master' into DDC-551
Conflicts:
	lib/Doctrine/ORM/Persisters/OneToManyPersister.php
2011-08-16 16:59:48 +02:00
Guilherme Blanco
7433148f17 Fixed bug in XMLDriver where relation indexes are treathed as elements but documented as attributes. 2011-08-16 11:36:41 -03:00
Alexander
3800581947 [DDC-551] Altered persisters to make filters work with EXTRA_LAZY associations 2011-08-16 16:24:50 +02:00
Alexander
2653d735e2 [DDC-551] Added state of the complete filter collection to the EM
Previously it was sufficient to use the old parser result for a Query if
the DQL didn't change (Query::STATE_CLEAN), but now there must also be
no changes to the filter collection of the EntityManager.

In the old situation each Query object would create a hash of all the
filter objects on it's own. That was not very efficient.

This commit adds the state of the current filter collection to the
EntityManager. The state will be set to FILTERS_STATE_DIRTY as a filter
is enabled, removed or a parameter is set on a filter. The hash is also
computed by the EntityManager, but only if the filter collection is
dirty. This will prevent recalculation of the hash with each query.
2011-08-16 13:34:42 +02:00
Alexander
3b1ddb0346 [DDC-551] Added filters to SQLWalker 2011-08-16 12:21:43 +02:00
Guilherme Blanco
6857134f36 Fixed issue with duplicated commas if Entity has no fields. 2011-08-15 12:47:17 -03:00
Guilherme Blanco
f148912a28 [DDC-934][DDC-1100][DDC-1331] Implemented support to multi-values in INSTANCE OF expression. 2011-08-15 01:53:56 -03:00
Guilherme Blanco
b9a24b5487 Merge pull request #93 from kwiateusz/UnitTestsUpdate
Last change from assertTrue($a instanceof $b) to assertInstanceOf
2011-08-14 21:05:15 -07:00
Benjamin Eberlei
2ee3cdeb0c Merge pull request #106 from FabioBatSilva/master
[DDC-1325] @Target annotation
2011-08-14 10:22:13 -07: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
Guilherme Blanco
a0ca506db7 Added support to SingleValuePathExpression in ORDER BY. 2011-08-14 00:46:02 -03:00
Guilherme Blanco
63a2f02f4d [DDC-408][DDC-1150][DDC-1277] Implemented support to parameter expanding on associations. 2011-08-13 21:28:54 -03:00
Fabio B. Silva
a04d2933fa @Target annotation and support to common 2.2-DEV 2011-08-13 16:28:05 -03:00
Guilherme Blanco
816ce41f63 Added support to CaseExpression. Added support to nest AndX and OrX QueryBuilder composite expressions, since they do not mess with generated queries. 2011-08-08 02:09:25 -03:00
Benjamin Eberlei
bcc7bb1c9c DDC-1300 - Fix bug in fetch join hydration of entities with foreign key identifier 2011-08-06 20:25:45 +02:00
Benjamin Eberlei
d583b149ac Merge pull request #98 from asm89/master
[DDC-1301] Fixed tests teardown for mysql suite
2011-07-31 02:41:19 -07:00
Benjamin Eberlei
816039f23f DDC-1302 - Fix bug in XmlDriver not handling orphan removal 2011-07-31 11:32:57 +02:00
Alexander
953a0f6572 [DDC-1301] Fixed tests teardown for mysql suite 2011-07-29 09:35:59 +02:00
Benjamin Eberlei
c34612b8e9 [DDC-1298] DDC117Link file got lost from 2.1.x to master somehow 2011-07-28 23:44:11 +02:00
Benjamin Eberlei
5c47c07794 Merge pull request #97 from asm89/DDC-1301
[DDC-1301] Fixed count() for fetch="EXTRA_LAZY" on OneToMany association
2011-07-28 14:26:15 -07:00
Benjamin Eberlei
8f589e5876 Merge pull request #92 from mridgway/DDC-1275
DDC-1275: Added join columns to result set mapping
2011-07-28 14:18:55 -07:00
Alexander
d439f67df5 [DDC-1301] Prefixed all Legacy models properties with _ 2011-07-28 12:25:23 +02:00
Alexander
b2951691e2 [DDC-1301] Added tests for fetch="EXTRA_LAZY" count() on a "legacy" database 2011-07-28 11:01:28 +02:00
Benjamin Eberlei
196632978c DDC-1298 - Fix bug in SQLWalker with derived entities that have no fields of their own. 2011-07-27 23:22:20 +02:00
kwiateusz
a47af43bc1 Last change from assertTrue($a instanceof $b) to assertInstanceOf 2011-07-27 08:54:06 +02:00
Michael Ridgway
7f20a32db3 Removing debug comment 2011-07-26 17:39:57 -04:00
Michael Ridgway
154fd60d85 DDC-1275: Added join columns to result set mapping 2011-07-26 17:35:06 -04:00
Benjamin Eberlei
57cfcfd20e Merge pull request #79 from mridgway/DDC-725
[DDC-725] Removed onUpdate property on join columns
2011-07-26 14:14:30 -07:00
Benjamin Eberlei
79d99b11ad Merge pull request #91 from kwiateusz/UnitTestsUpdate
Removed deprecated assertType (thanks @kwiateusz)
2011-07-26 14:03:04 -07: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
Alexander
6cf7bdc2b7 Merge branch 'master' into DDC-551 2011-07-26 17:26:00 +02:00
Alexander
97a4dbf2cd [DDC-1294] Added more tests for subselects in subselects 2011-07-26 17:15:21 +02:00
kwiateusz
7261060905 Few more converts from assertTrue($a instance of $b) to assertInstanceOf 2011-07-26 15:22:57 +02:00
kwiateusz
1ea3e543ab Correted indentation and variable name 2011-07-26 12:10:30 +02:00
kwiateusz
49c735109c Change from assertType to assertInstanceOf.
Now PHPUnit doesn't show warning about deprecation of assertType.
Also some refractoring from assertTrue($a instanceof $b) to assertInstanceOf.
Leading \ in namespaces is not required so I removed it from few assertions.
2011-07-26 11:38:09 +02:00
Alexander
65f7e897b5 [DDC-1294] Add discriminator information to subselects 2011-07-26 00:19:26 +02:00