DDC-1369: "throw" keyword missing in _getCollectionOrderBySQL #1716

Closed
opened 2026-01-22 13:23:09 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Sep 9, 2011).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user keesschepers:

In the BasicEntityPersister.php around line 901 there proberly is a keyword "throw" missing in the function _getCollectionOrderBySQL.

The following code:
if ( ! isset($this->_class->fieldMappings[$fieldName])) {
ORMException::unrecognizedField($fieldName);
}

Should be:
if ( ! isset($this->_class->fieldMappings[$fieldName])) {
throw ORMException::unrecognizedField($fieldName);
}

In my case because of this keyword missing Doctrine tried to execute a query like:

SELECT t0.id AS id1, t0.stockprice AS stockprice2, t0.productoptionvalueid AS productoptionvalueid3, t0.productid AS productid4 FROM productoptionvalue_to_product t0 WHERE t0.productid = '1852' ORDER BY t0. ASC

Originally created by @doctrinebot on GitHub (Sep 9, 2011). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user keesschepers: In the BasicEntityPersister.php around line 901 there proberly is a keyword "throw" missing in the function _getCollectionOrderBySQL. The following code: if ( ! isset($this->_class->fieldMappings[$fieldName])) { ORMException::unrecognizedField($fieldName); } Should be: if ( ! isset($this->_class->fieldMappings[$fieldName])) { throw ORMException::unrecognizedField($fieldName); } In my case because of this keyword missing Doctrine tried to execute a query like: SELECT t0.id AS id1, t0.stockprice AS stockprice2, t0.productoptionvalueid AS productoptionvalueid3, t0.productid AS productid4 FROM productoptionvalue_to_product t0 WHERE t0.productid = '1852' ORDER BY t0. ASC
admin added the Bug label 2026-01-22 13:23:09 +01:00
admin closed this issue 2026-01-22 13:23:11 +01:00
Author
Owner

@doctrinebot commented on GitHub (Sep 25, 2011):

Comment created by @beberlei:

This bug is fixed in 2.1 and its priority is trivial, i won't fix it in 2.0 anymore, please upgrade to 2.1

@doctrinebot commented on GitHub (Sep 25, 2011): Comment created by @beberlei: This bug is fixed in 2.1 and its priority is trivial, i won't fix it in 2.0 anymore, please upgrade to 2.1
Author
Owner

@doctrinebot commented on GitHub (Sep 25, 2011):

Issue was closed with resolution "Won't Fix"

@doctrinebot commented on GitHub (Sep 25, 2011): Issue was closed with resolution "Won't Fix"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#1716