[PR #374] [CLOSED] Get parent classes #8103

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

📋 Pull Request Information

Original PR: https://github.com/doctrine/orm/pull/374
Author: @TomHAnderson
Created: 6/14/2012
Status: Closed

Base: masterHead: getParentClasses


📝 Commits (10+)

  • 212e1d6 Fix notice when using regenerate if exists and file is not new.
  • 0b6b879 [DDC-1601] Fix bugs in SchemaValidator, using all modelsets as testdata for a large test
  • fb85cdf [DDC-1601] Fix failing test and remove unused code
  • 1574d48 Merge branch 'DDC-1601' into 2.2
  • 45fbc05 Merge remote-tracking branch 'origin/2.2' into 2.2
  • b6896a0 DDC-1585 - Throw exception if setting target entity of the wrong type to an assocation.
  • 7d77373 Merge branch 'DDC-1585' into 2.2
  • e058b47 DDC-1594 - Fix problem with merge and an existing managed proxy instance.
  • 789ce16 Merge branch 'DDC-1594' into 2.2
  • a37aabb Pass options attribute in @Column annotation to Schema\Column's customSchemaOptions

📊 Changes

103 files changed (+3855 additions, -309 deletions)

View changed files

📝 UPGRADE_TO_2_2 (+6 -1)
📝 build.xml (+2 -2)
📝 composer.json (+2 -2)
📝 doctrine-mapping.xsd (+1 -0)
📝 lib/Doctrine/ORM/AbstractQuery.php (+171 -3)
📝 lib/Doctrine/ORM/Configuration.php (+22 -0)
📝 lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php (+15 -0)
📝 lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php (+1 -1)
📝 lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php (+22 -17)
📝 lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php (+1 -12)
📝 lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php (+1 -1)
📝 lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php (+16 -4)
📝 lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php (+19 -13)
📝 lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php (+23 -5)
📝 lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php (+4 -0)
📝 lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php (+8 -3)
📝 lib/Doctrine/ORM/Mapping/ManyToMany.php (+2 -0)
📝 lib/Doctrine/ORM/PersistentCollection.php (+33 -3)
📝 lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php (+1 -1)
📝 lib/Doctrine/ORM/Persisters/BasicEntityPersister.php (+5 -10)

...and 80 more files

📄 Description

Added function get parent classes to ClassMetadataInfo.

I added this function to differentiate between inherited entities and traditional entities. We are using a modified version of SimpleThings audit reader and inherited entities can't be audited this way, the parent entity must. The code was iterating over the list of entities and I broke out when an entity has parent classes, using this function.


🔄 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/374 **Author:** [@TomHAnderson](https://github.com/TomHAnderson) **Created:** 6/14/2012 **Status:** ❌ Closed **Base:** `master` ← **Head:** `getParentClasses` --- ### 📝 Commits (10+) - [`212e1d6`](https://github.com/doctrine/orm/commit/212e1d6df6418018afd81ef005b4ae076bbc80d2) Fix notice when using regenerate if exists and file is not new. - [`0b6b879`](https://github.com/doctrine/orm/commit/0b6b87912c268998f83fed63b66f9bc29ac3c6e5) [DDC-1601] Fix bugs in SchemaValidator, using all modelsets as testdata for a large test - [`fb85cdf`](https://github.com/doctrine/orm/commit/fb85cdfce0933bdeee9334f84ce3857e54df98fb) [DDC-1601] Fix failing test and remove unused code - [`1574d48`](https://github.com/doctrine/orm/commit/1574d482fe7ce773a2d181af1b6530e39861c144) Merge branch 'DDC-1601' into 2.2 - [`45fbc05`](https://github.com/doctrine/orm/commit/45fbc058a97c44128d16328e764f8048a658a6f6) Merge remote-tracking branch 'origin/2.2' into 2.2 - [`b6896a0`](https://github.com/doctrine/orm/commit/b6896a04e515a5aad2ab6811f604804fb2aa7901) DDC-1585 - Throw exception if setting target entity of the wrong type to an assocation. - [`7d77373`](https://github.com/doctrine/orm/commit/7d77373a715eb54866b99e7925bfa868dbad75e0) Merge branch 'DDC-1585' into 2.2 - [`e058b47`](https://github.com/doctrine/orm/commit/e058b479665795a1435246694d117f377cc2fc79) DDC-1594 - Fix problem with merge and an existing managed proxy instance. - [`789ce16`](https://github.com/doctrine/orm/commit/789ce1604fd6437094dcac4258bb2043adfc0d2d) Merge branch 'DDC-1594' into 2.2 - [`a37aabb`](https://github.com/doctrine/orm/commit/a37aabb11f5e7fbf0f099a2b89c2a887e40c95aa) Pass options attribute in @Column annotation to Schema\Column's customSchemaOptions ### 📊 Changes **103 files changed** (+3855 additions, -309 deletions) <details> <summary>View changed files</summary> 📝 `UPGRADE_TO_2_2` (+6 -1) 📝 `build.xml` (+2 -2) 📝 `composer.json` (+2 -2) 📝 `doctrine-mapping.xsd` (+1 -0) 📝 `lib/Doctrine/ORM/AbstractQuery.php` (+171 -3) 📝 `lib/Doctrine/ORM/Configuration.php` (+22 -0) 📝 `lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php` (+15 -0) 📝 `lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php` (+1 -1) 📝 `lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php` (+22 -17) 📝 `lib/Doctrine/ORM/Internal/Hydration/SimpleObjectHydrator.php` (+1 -12) 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php` (+1 -1) 📝 `lib/Doctrine/ORM/Mapping/ClassMetadataInfo.php` (+16 -4) 📝 `lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php` (+19 -13) 📝 `lib/Doctrine/ORM/Mapping/Driver/DatabaseDriver.php` (+23 -5) 📝 `lib/Doctrine/ORM/Mapping/Driver/XmlDriver.php` (+4 -0) 📝 `lib/Doctrine/ORM/Mapping/Driver/YamlDriver.php` (+8 -3) 📝 `lib/Doctrine/ORM/Mapping/ManyToMany.php` (+2 -0) 📝 `lib/Doctrine/ORM/PersistentCollection.php` (+33 -3) 📝 `lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php` (+1 -1) 📝 `lib/Doctrine/ORM/Persisters/BasicEntityPersister.php` (+5 -10) _...and 80 more files_ </details> ### 📄 Description Added function get parent classes to ClassMetadataInfo. I added this function to differentiate between inherited entities and traditional entities. We are using a modified version of SimpleThings audit reader and inherited entities can't be audited this way, the parent entity must. The code was iterating over the list of entities and I broke out when an entity has parent classes, using this function. --- <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:23 +01:00
admin closed this issue 2026-01-22 15:58:24 +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#8103