Project

General

Profile

Bug(バグ) #3340

Doctrine でサブクエリに小文字が指定できない

Added by Yuya Watanabe about 9 years ago. Updated over 2 years ago.

Status:
New(新規)
Priority:
Normal(通常)
Assignee:
-
Target version:
Start date:
2013-05-07
Due date:
% Done:

0%

3.6 で発生するか:
Unknown (未調査)
3.8 で発生するか:
Unknown (未調査)

Description

概要

Doctrine でサブクエリに小文字が指定できない.

lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
 858     public function parseSubquery($subquery)
 859     {       
 860         $trimmed = trim($this->_tokenizer->bracketTrim($subquery));
 861                 
 862         // check for possible subqueries
 863         if (substr($trimmed, 0, 4) == 'FROM' || substr($trimmed, 0, 6) == 'SELECT') {
 864             // parse subquery
 865             $q = $this->createSubquery()->parseDqlQuery($trimmed);
 866             $trimmed = $q->getSqlQuery();
 867             $q->free();
 868         } else if (substr($trimmed, 0, 4) == 'SQL:') {

下記のように別の部分では strtolower() や strtoupper() のようにどちらかを用いて大文字小文字どちらでも対応できるようにされているが,サブクエリの場合の上記の場合のみなぜか考慮されていない.

lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query.php
1625     public function parseDqlQuery($query, $clear = true)
...
1637         foreach ($parts as $partName => $subParts) {
1638             $subParts = trim($subParts);
1639             $partName = strtolower($partName);
1640             switch ($partName) {
1641                 case 'create':
1642                     $this->_type = self::CREATE;
1643                 break;

History

#1 Updated by kaoru n over 2 years ago

  • Target version set to OpenPNE 3.10.x

Also available in: Atom PDF