http://redmine.openpne.jp/
http://redmine.openpne.jp/favicon.ico
2013-05-07T02:01:16Z
OpenPNE Issue Tracking System
OpenPNE 3 - Bug(バグ) #3339: Doctrine で WHERE IN を用いたサブクエリの場合に配列が正しく展開されない
http://redmine.openpne.jp/issues/3339?journal_id=16497
2013-05-07T02:01:16Z
Yuya Watanabe
watanabe@openpne.jp
<ul><li><strong>説明</strong> を更新 (<a title="差分を表示" href="/journals/16497/diff?detail_id=21618">diff</a>)</li></ul>
OpenPNE 3 - Bug(バグ) #3339: Doctrine で WHERE IN を用いたサブクエリの場合に配列が正しく展開されない
http://redmine.openpne.jp/issues/3339?journal_id=16498
2013-05-07T05:33:27Z
Yuya Watanabe
watanabe@openpne.jp
<ul><li><strong>説明</strong> を更新 (<a title="差分を表示" href="/journals/16498/diff?detail_id=21619">diff</a>)</li></ul><p>サブクエリ出ない場合は正しく動いているようなので本文から記述を削除.</p>
OpenPNE 3 - Bug(バグ) #3339: Doctrine で WHERE IN を用いたサブクエリの場合に配列が正しく展開されない
http://redmine.openpne.jp/issues/3339?journal_id=16499
2013-05-07T05:54:20Z
Yuya Watanabe
watanabe@openpne.jp
<ul></ul><a name="サブクエリでない場合"></a>
<h3 >サブクエリでない場合<a href="#サブクエリでない場合" class="wiki-anchor">¶</a></h3>
<pre>
$q = Doctrine_Core::getTable('MemberConfig')->createQuery('c');
$q->select('m.id')
->from('Member m')
->andWhereIn('m.id', array('1', '2'));
$q->execute();
</pre>
<pre>
SELECT m.id AS m__id FROM member m WHERE (m.id IN (?, ?) AND (m.is_active = ? OR m.is_active IS NULL))
</pre>
<pre>
array(3) {
[0] =>
string(1) "1"
[1] =>
string(1) "2"
[2] =>
int(1)
}
</pre>
OpenPNE 3 - Bug(バグ) #3339: Doctrine で WHERE IN を用いたサブクエリの場合に配列が正しく展開されない
http://redmine.openpne.jp/issues/3339?journal_id=16500
2013-05-07T06:49:01Z
Yuya Watanabe
watanabe@openpne.jp
<ul></ul><p>クエリやパラメータを確認する際に行った変更.</p>
<pre>
diff --git a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php b/lib/vendor/symfony/lib/plugins
/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
index 015f2c9..3234150 100644
--- a/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
+++ b/lib/vendor/symfony/lib/plugins/sfDoctrinePlugin/lib/vendor/doctrine/Doctrine/Query/Abstract.php
@@ -980,6 +980,8 @@ abstract class Doctrine_Query_Abstract
return $this->_conn->exec($query, $params);
}
+ var_dump($query);
+ var_dump($params);
$stmt = $this->_conn->execute($query, $params);
$this->_params['exec'] = array();
</pre>
OpenPNE 3 - Bug(バグ) #3339: Doctrine で WHERE IN を用いたサブクエリの場合に配列が正しく展開されない
http://redmine.openpne.jp/issues/3339?journal_id=24436
2020-01-29T08:43:03Z
kaoru n
<ul><li><strong>対象バージョン</strong> を <i>OpenPNE 3.10.x</i> にセット</li></ul>