mirror of
https://github.com/doctrine/orm.git
synced 2026-03-23 22:42:18 +01:00
DDC-858: orderBy on associations does not work with discriminator columns #1063
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @doctrinebot on GitHub (Nov 5, 2010).
Originally assigned to: @guilhermeblanco on GitHub.
Jira issue originally created by user sebastian.hoitz:
When you specify a oneToMany or manyToMany association to be ordered by a discriminator column, Doctrine fails, giving this error:
C:\Users\Sebastian Hoitz\Documents\Entwicklung\kt_api\trunk\tools>doctrine orm:validate-schema
[Mapping] FAIL - The entity-class 'App_Model_Contact' mapping is invalid:
But in some cases (think of attributes, for example) you would really need this.
@doctrinebot commented on GitHub (Nov 5, 2010):
Comment created by sebastian.hoitz:
Changing ClassMetadataInfo::hasField to this would fix the issue:
But I'm not sure if this is the most elegant solution.
Correction: This only solves the doctrine orm:schema-validate error. It does not order correctly :(
@doctrinebot commented on GitHub (Oct 16, 2011):
Comment created by @guilhermeblanco:
Discriminator columns should never be used from user perspective. Discriminators are a internal helper for ORM only.
If you want to achieve a similar thing, you should add your own type field and track it for yourself.
@doctrinebot commented on GitHub (Oct 16, 2011):
Issue was closed with resolution "Invalid"