こんにちは、zend db select で join を使用したいと考えています。私はそれsetintegritycheck()
が結合において重要であることを知っています。次のようなモデルオブジェクトを持っているときにそれを実装する方法を知っています
$select = $this->select();
$select->setintegritycheck(false);
$select->from(array('info'),array())
->join(array('cfields'),'info.class=cfields.class_id',array('field_id','type_id'))
->where('info.id=2');
しかし、私の場合、私はモデルではありません。私は持っていdbadapter
ます。今、私はこのようにクエリを書いています
$dbAdapter = MyManager::getDbAdapator('project');
$select = $dbAdapter->select('info');
$select->setIntegrityCheck(false);
$select->from(array('info'),array())
->join(array('cfields'),'info.class=cfields.class_id',array('field_id','type_id'))
->where('info.id=2');
この線
$dbAdapter = MyManager::getDbAdapator('project');
プロジェクトデータベースのアダプターを返します。私はそれを確認しました。この場合、私の選択オブジェクトはdbアダプタからのものであるため、取得しようとsetintegritycheck
するとエラーが発生します
Unrecognized method 'setIntegrityCheck()'
この場合、どのように整合性チェックを入れることができるか教えてもらえますか。