0
A
回答
1
關於該文件,這是不可能的:http://propelorm.org/reference/model-criteria.html#getting-columns-instead-of-objects
但是你可以做你自己。
內置的字段(根據您的同行類)的數組,並刪除那些當你建立你的查詢,你不需要
$fields = MyTablePeer::$fieldKeys[BasePeer::TYPE_PHPNAME];
/**
will give you (for example):
array (
'Id' => 0,
'Name' => 1,
'Content' => 2,
)
*/
// remove unwanted column
unset($fields['Name']);
$items = MyTableQuery::create()
->select(array_keys($fields))
->find();
}
相關問題
- 1. 如何在使用P/Invoke編組結構時忽略字段
- 2. 如何使用Marshal.SizeOf忽略結構中的字段大小?
- 3. 使用BING SEARCH API時,如何忽略重複結果?
- 4. 取消/忽略ReactiveAsyncCommand的結果在ReactiveUI
- 5. 從sql中獲取結果並忽略一些數字
- 6. 如何用org.json.JSONObject忽略字段(Object)
- 7. 使用Propel時有沒有辦法忽略現有的表格?
- 8. 使用C#SDK讀取(反序列化)時忽略字段
- 9. 用Fluent Nhibernate插入時忽略字段
- 10. SQL - 如何忽略$ nb結果?
- 11. 如何忽略返回結果
- 12. 在Unix中使用find命令時忽略「是目錄」結果
- 13. 如果結果爲空,如何獲取字段名稱? [PHP-笨]
- 14. 如何在回顯mysql查詢結果時忽略重複行
- 15. 使用serializeArray()方法忽略空字段
- 16. Android - 使用片段獲取結果
- 17. 如何在Propel中檢索字段?
- 18. 如何忽略數據字段中的「,」
- 19. 如何讓Isset()忽略空字段?
- 20. Saltstack:忽略cmd.run的結果
- 21. 'File.mkdirs()'的結果被忽略
- 22. 如何在插入MySQL數據庫時忽略空字段?
- 23. 如何在更新Elasticsearch文檔時忽略空值的字段?
- 24. 如何在JSON反序列化時忽略某些字段?
- 25. 如何在記錄SOAP消息時忽略base64binary字段?
- 26. jquery.validation - 如何在驗證必填字段時忽略默認值
- 27. 如何讓DataContext在更新記錄時忽略特定字段?
- 28. 如何在使用API進行搜索時忽略搜索字段?
- 29. 在C中讀取輸入文件時忽略空白字段
- 30. 獲取數查詢結果與忽略LIMIT聲明