Ben şu tablo var
Test:
tableName: test
columns:
test_id:
name: test_id as id
primary: true
autoincrement: true
type: integer
notnull: true
test_name:
name: test_name as name
type: string(255)
test_title:
name: test_title as title
type: string(255)
ve bu dql beyanı
$dql = Doctrine_Query::create()->select('t.name')->from('Model_Test t');
oluşan aşağıdaki SQL ist
SELECT t.test_id AS t__test_id, t.test_name AS t__test_name FROM test t
ancak doktrin sonucu getiriliyor sonra, ben başlık alana erişim bile seçili değil:
foreach ($results as $result) {
foreach ($result as $filed => $value) {
echo "$filed => $value <hr>"; // echoes 'title' => null but title in db has other value
}
}
Ayrıca Zend_Debug üzeri dökümü :: dökümü ($ sonuçları-> toArray ()); Ben * Bir seçme yapmış olurdu sanki bana bütün alanları gösterir
Peki nasıl benim seçim maç döndü alanları sınırlamak için?
Şimdiden teşekkürler
Kırlangıç