From e578bad6878ad536cb93ecaaac775f5b89658cbd Mon Sep 17 00:00:00 2001 From: romanb Date: Thu, 13 Aug 2009 10:13:06 +0000 Subject: [PATCH] [2.0] Fixed several referential integrity issues. Fixed critical issue with inserts being run twice on postgresql/oracle. Added support for additional tree walkers that modify the AST prior to SQL construction and started to play with it in a testcase. --- build.xml | 2 +- doctrine-mapping.xsd | 4 +- lib/Doctrine/Common/Util/Inflector.php | 269 ++++++++ lib/Doctrine/DBAL/Configuration.php | 2 +- lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php | 1 - lib/Doctrine/DBAL/Driver/Statement.php | 2 +- lib/Doctrine/ORM/EntityManager.php | 21 +- lib/Doctrine/ORM/EntityRepository.php | 92 +-- .../ORM/Internal/Hydration/ObjectHydrator.php | 6 +- .../Persisters/StandardEntityPersister.php | 24 +- .../ORM/Proxy/ProxyClassGenerator.php | 13 +- lib/Doctrine/ORM/Query.php | 7 +- .../ORM/Query/AST/QuantifiedExpression.php | 5 - lib/Doctrine/ORM/Query/Parser.php | 70 +- lib/Doctrine/ORM/Query/SqlWalker.php | 24 +- lib/Doctrine/ORM/Query/TreeWalkerAdapter.php | 23 +- lib/Doctrine/ORM/Query/TreeWalkerChain.php | 612 ++++++++++++++++++ lib/Doctrine/ORM/UnitOfWork.php | 52 +- tests/Doctrine/Tests/ORM/AllTests.php | 2 +- .../ORM/Functional/BasicFunctionalTest.php | 2 +- .../ORM/Functional/CustomTreeWalkersTest.php | 116 ++++ ...OneToOneSelfReferentialAssociationTest.php | 6 +- .../Functional/SingleTableInheritanceTest.php | 4 +- .../Mapping/xml/XmlMappingTest.User.dcm.xml | 4 +- tests/Doctrine/Tests/ORM/Proxy/AllTests.php | 30 + .../ORM/Proxy/ProxyClassGeneratorTest.php | 10 +- .../ORM/Query/LanguageRecognitionTest.php | 10 +- .../ORM/Query/SelectSqlGenerationTest.php | 13 + tests/Doctrine/Tests/ORM/QueryBuilderTest.php | 6 +- .../Doctrine/Tests/OrmFunctionalTestCase.php | 5 +- 30 files changed, 1244 insertions(+), 193 deletions(-) create mode 100644 lib/Doctrine/Common/Util/Inflector.php create mode 100644 lib/Doctrine/ORM/Query/TreeWalkerChain.php create mode 100644 tests/Doctrine/Tests/ORM/Functional/CustomTreeWalkersTest.php create mode 100644 tests/Doctrine/Tests/ORM/Proxy/AllTests.php diff --git a/build.xml b/build.xml index dded9f630..521f6b619 100644 --- a/build.xml +++ b/build.xml @@ -97,7 +97,7 @@ - +