[PR #372] [MERGED] [DDC-1845] QuoteStrategy #8094

Open
opened 2026-01-22 15:58:21 +01:00 by admin · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/372
Author: @FabioBatSilva
Created: 6/12/2012
Status: Merged
Merged: 6/25/2012
Merged by: @guilhermeblanco

Base: masterHead: DDC-1845


📝 Commits (10+)

  • 9f297c3 first tests for DefaultQuoteStrategy
  • 2b4c29e tests for default strategy
  • 1bcda51 inject quote strategy into sql walker
  • d49a968 tests for DDC-1719
  • db53b86 apply quote strategy at sqlwalker
  • 505bdb9 missing files
  • 5d665b5 remove getQuotedIdentifierColumnNames
  • 2af7b3f use quote strategy in BasicEntityPersister
  • 7f64474 use quote strategy in persister
  • 36296a3 use quote strategy in JoinedSubclassPersister

📊 Changes

30 files changed (+1817 additions, -465 deletions)

View changed files

📝 lib/Doctrine/ORM/Configuration.php (+28 -0)
📝 lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php (+49 -16)
📝 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (+69 -18)
lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php (+140 -0)
lib/Doctrine/ORM/Mapping/QuoteStrategy.php (+112 -0)
📝 lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php (+19 -3)
📝 lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php (+1 -1)
📝 lib/Doctrine/ORM/Persisters/BasicEntityPersister.php (+97 -61)
📝 lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php (+11 -11)
📝 lib/Doctrine/ORM/Persisters/ManyToManyPersister.php (+12 -12)
📝 lib/Doctrine/ORM/Persisters/OneToManyPersister.php (+3 -3)
📝 lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php (+16 -15)
📝 lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php (+11 -10)
📝 lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php (+12 -12)
📝 lib/Doctrine/ORM/Query/SqlWalker.php (+270 -238)
📝 lib/Doctrine/ORM/Tools/SchemaTool.php (+71 -61)
tests/Doctrine/Tests/Models/Quote/Address.php (+54 -0)
tests/Doctrine/Tests/Models/Quote/Group.php (+42 -0)
tests/Doctrine/Tests/Models/Quote/Phone.php (+24 -0)
tests/Doctrine/Tests/Models/Quote/SimpleEntity.php (+32 -0)

...and 10 more files

📄 Description

QuoteStrategy

http://www.doctrine-project.org/jira/browse/DDC-1845

This patch fix some quote problems using a default quote strategy and allows users find solutions themselves for weird quote cases.

This DBAL PR shoud be merged to fix sqlite tests in : https://github.com/doctrine/dbal/pull/158

There is a lote of new method calls, the performance tests in sqlite are the following :

My branch :

. testSimpleQueryScalarHydrationPerformance10000Rows - 0.37292098999023 seconds
. testSimpleQueryArrayHydrationPerformance10000Rows - 0.50411009788513 seconds
. testMixedQueryFetchJoinArrayHydrationPerformance10000Rows - 1.1323919296265 seconds
. testSimpleQueryPartialObjectHydrationPerformance10000Rows - 1.0243051052094 seconds
. testSimpleQueryFullObjectHydrationPerformance10000Rows - 4.1673181056976 seconds
. testMixedQueryFetchJoinPartialObjectHydrationPerformance2000Rows - 0.40403699874878 seconds
. testMixedQueryFetchJoinFullObjectHydrationPerformance2000Rows - 0.873291015625 seconds
. 99 CompanyContract: 0.023395
. 99 CompanyContract: 0.019528
. Memory usage before: 111715.53125 KB
. Memory usage after: 110282.875 KB
. Inserted 10000 objects in 5.5240259170532 seconds
. 100 CmsArticle findAll(): 0.018410
. 100 CmsArticle findAll(): 0.014157
. 100 CmsArticle find(): 0.043304
. 100 CmsArticle find(): 0.041451
. 100 CmsGroup: 0.009315
. 100 CmsGroup: 0.009239
. 100 CmsUser: 0.024051
. 100 CmsUser: 0.023655
. Compute ChangeSet 100 objects in 0.040482997894287 seconds

. Time: 19 seconds, Memory: 261.50Mb

Doctrine Master :

. testSimpleQueryScalarHydrationPerformance10000Rows - 0.37668490409851 seconds
. testSimpleQueryArrayHydrationPerformance10000Rows - 0.5009880065918 seconds
. testMixedQueryFetchJoinArrayHydrationPerformance10000Rows - 1.131824016571 seconds
. testSimpleQueryPartialObjectHydrationPerformance10000Rows - 1.037791967392 seconds
. testSimpleQueryFullObjectHydrationPerformance10000Rows - 4.1992859840393 seconds
. testMixedQueryFetchJoinPartialObjectHydrationPerformance2000Rows - 0.41158103942871 seconds
. testMixedQueryFetchJoinFullObjectHydrationPerformance2000Rows - 0.86575293540955 seconds
. 99 CompanyContract: 0.023206
. 99 CompanyContract: 0.020555
. Inserted 10000 objects in 5.4995818138123 seconds
. 100 CmsArticle findAll(): 0.018785
. 100 CmsArticle findAll(): 0.014160
. 100 CmsArticle find(): 0.042067
. 100 CmsArticle find(): 0.041076
. 100 CmsGroup: 0.009478
. 100 CmsGroup: 0.010591
. 100 CmsUser: 0.023727
. 100 CmsUser: 0.023073
. Compute ChangeSet 100 objects in 0.040009021759033 seconds

. Time: 19 seconds, Memory: 260.50Mb

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/doctrine/orm/pull/372 **Author:** [@FabioBatSilva](https://github.com/FabioBatSilva) **Created:** 6/12/2012 **Status:** ✅ Merged **Merged:** 6/25/2012 **Merged by:** [@guilhermeblanco](https://github.com/guilhermeblanco) **Base:** `master` ← **Head:** `DDC-1845` --- ### 📝 Commits (10+) - [`9f297c3`](https://github.com/doctrine/orm/commit/9f297c3140c26522ca2cfd659f49069d2acacfb3) first tests for DefaultQuoteStrategy - [`2b4c29e`](https://github.com/doctrine/orm/commit/2b4c29e4f29ef914a929ac35598bc8adb70f94df) tests for default strategy - [`1bcda51`](https://github.com/doctrine/orm/commit/1bcda5147a890a8f419eb333df69852bd4f6b307) inject quote strategy into sql walker - [`d49a968`](https://github.com/doctrine/orm/commit/d49a968d554e5ec464305b704b6be62db8ecd9fb) tests for DDC-1719 - [`db53b86`](https://github.com/doctrine/orm/commit/db53b8651cf2b8848b8ca24201aa3a1d2ca0b9b7) apply quote strategy at sqlwalker - [`505bdb9`](https://github.com/doctrine/orm/commit/505bdb9c032a2034ed5d4489a8b2680d2b798b85) missing files - [`5d665b5`](https://github.com/doctrine/orm/commit/5d665b59a18e24539bb186c9edb0458455bd49af) remove getQuotedIdentifierColumnNames - [`2af7b3f`](https://github.com/doctrine/orm/commit/2af7b3fd38557fa71838d07d53744c386fc16eb4) use quote strategy in BasicEntityPersister - [`7f64474`](https://github.com/doctrine/orm/commit/7f64474f3e92dfe92f2724be1414ef917b0e0176) use quote strategy in persister - [`36296a3`](https://github.com/doctrine/orm/commit/36296a390653cb705705a6b879b4370a4f504776) use quote strategy in JoinedSubclassPersister ### 📊 Changes **30 files changed** (+1817 additions, -465 deletions) <details> <summary>View changed files</summary> 📝 `lib/Doctrine/ORM/Configuration.php` (+28 -0) 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php` (+49 -16) 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php` (+69 -18) ➕ `lib/Doctrine/ORM/Mapping/DefaultQuoteStrategy.php` (+140 -0) ➕ `lib/Doctrine/ORM/Mapping/QuoteStrategy.php` (+112 -0) 📝 `lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php` (+19 -3) 📝 `lib/Doctrine/ORM/Persisters/AbstractEntityInheritancePersister.php` (+1 -1) 📝 `lib/Doctrine/ORM/Persisters/BasicEntityPersister.php` (+97 -61) 📝 `lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php` (+11 -11) 📝 `lib/Doctrine/ORM/Persisters/ManyToManyPersister.php` (+12 -12) 📝 `lib/Doctrine/ORM/Persisters/OneToManyPersister.php` (+3 -3) 📝 `lib/Doctrine/ORM/Query/AST/Functions/SizeFunction.php` (+16 -15) 📝 `lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php` (+11 -10) 📝 `lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php` (+12 -12) 📝 `lib/Doctrine/ORM/Query/SqlWalker.php` (+270 -238) 📝 `lib/Doctrine/ORM/Tools/SchemaTool.php` (+71 -61) ➕ `tests/Doctrine/Tests/Models/Quote/Address.php` (+54 -0) ➕ `tests/Doctrine/Tests/Models/Quote/Group.php` (+42 -0) ➕ `tests/Doctrine/Tests/Models/Quote/Phone.php` (+24 -0) ➕ `tests/Doctrine/Tests/Models/Quote/SimpleEntity.php` (+32 -0) _...and 10 more files_ </details> ### 📄 Description ### QuoteStrategy http://www.doctrine-project.org/jira/browse/DDC-1845 This patch fix some quote problems using a default quote strategy and allows users find solutions themselves for weird quote cases. This DBAL PR shoud be merged to fix sqlite tests in : https://github.com/doctrine/dbal/pull/158 There is a lote of new method calls, the performance tests in sqlite are the following : #### My branch : ``` . testSimpleQueryScalarHydrationPerformance10000Rows - 0.37292098999023 seconds . testSimpleQueryArrayHydrationPerformance10000Rows - 0.50411009788513 seconds . testMixedQueryFetchJoinArrayHydrationPerformance10000Rows - 1.1323919296265 seconds . testSimpleQueryPartialObjectHydrationPerformance10000Rows - 1.0243051052094 seconds . testSimpleQueryFullObjectHydrationPerformance10000Rows - 4.1673181056976 seconds . testMixedQueryFetchJoinPartialObjectHydrationPerformance2000Rows - 0.40403699874878 seconds . testMixedQueryFetchJoinFullObjectHydrationPerformance2000Rows - 0.873291015625 seconds . 99 CompanyContract: 0.023395 . 99 CompanyContract: 0.019528 . Memory usage before: 111715.53125 KB . Memory usage after: 110282.875 KB . Inserted 10000 objects in 5.5240259170532 seconds . 100 CmsArticle findAll(): 0.018410 . 100 CmsArticle findAll(): 0.014157 . 100 CmsArticle find(): 0.043304 . 100 CmsArticle find(): 0.041451 . 100 CmsGroup: 0.009315 . 100 CmsGroup: 0.009239 . 100 CmsUser: 0.024051 . 100 CmsUser: 0.023655 . Compute ChangeSet 100 objects in 0.040482997894287 seconds . Time: 19 seconds, Memory: 261.50Mb ``` #### Doctrine Master : ``` . testSimpleQueryScalarHydrationPerformance10000Rows - 0.37668490409851 seconds . testSimpleQueryArrayHydrationPerformance10000Rows - 0.5009880065918 seconds . testMixedQueryFetchJoinArrayHydrationPerformance10000Rows - 1.131824016571 seconds . testSimpleQueryPartialObjectHydrationPerformance10000Rows - 1.037791967392 seconds . testSimpleQueryFullObjectHydrationPerformance10000Rows - 4.1992859840393 seconds . testMixedQueryFetchJoinPartialObjectHydrationPerformance2000Rows - 0.41158103942871 seconds . testMixedQueryFetchJoinFullObjectHydrationPerformance2000Rows - 0.86575293540955 seconds . 99 CompanyContract: 0.023206 . 99 CompanyContract: 0.020555 . Inserted 10000 objects in 5.4995818138123 seconds . 100 CmsArticle findAll(): 0.018785 . 100 CmsArticle findAll(): 0.014160 . 100 CmsArticle find(): 0.042067 . 100 CmsArticle find(): 0.041076 . 100 CmsGroup: 0.009478 . 100 CmsGroup: 0.010591 . 100 CmsUser: 0.023727 . 100 CmsUser: 0.023073 . Compute ChangeSet 100 objects in 0.040009021759033 seconds . Time: 19 seconds, Memory: 260.50Mb ``` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
admin added the pull-request label 2026-01-22 15:58:21 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#8094