同一查詢我有推動查詢行走返回與同桌
$articles = ArticlesQuery::create()->find();
var_dump($articles);
exit;
哪些查詢項目表(ID,users_id,article_category_id,images_id,標題,正文,批准,CREATED_DATE,刪除),但不同的輸出我得到的結果是非常不同的。
預期的結果是
object(PropelObjectCollection)[34]
object(Articles)[35]
protected 'startCopy' => boolean false
protected 'id' => int 1
protected 'users_id' => int 1
protected 'articles_category_id' => int 1
protected 'images_id' => int 1
protected 'title' => string 'Article Title Here updated' (length=26)
protected 'body' => resource(68, stream)
protected 'approved' => int 0
protected 'created_date' => null
protected 'deleted' => null
protected 'aUsers' => null
protected 'aArticlesCategory' => null
protected 'alreadyInSave' => boolean false
protected 'alreadyInValidation' => boolean false
protected 'validationFailures' =>
array
empty
protected '_new' => boolean false
protected '_deleted' => boolean false
protected 'modifiedColumns' =>
array
empty
protected 'virtualColumns' =>
array
empty
但結果我得到的是
object(PropelObjectCollection)[49]
object(Articles)[50]
protected 'startCopy' => boolean false
protected 'id' => int 1
protected 'users_id' => int 1
protected 'articles_category_id' => int 0
protected 'images_id' => int 0
protected 'title' => string '[email protected]' (length=22)
protected 'body' => resource(71, stream)
protected 'approved' => int 0
protected 'created_date' => null
protected 'deleted' => null
protected 'aUsers' => null
protected 'aArticlesCategory' => null
protected 'alreadyInSave' => boolean false
protected 'alreadyInValidation' => boolean false
protected 'validationFailures' =>
array
empty
protected '_new' => boolean false
protected '_deleted' => boolean false
protected 'modifiedColumns' =>
array
empty
protected 'virtualColumns' =>
array
empty
同樣的查詢更早的工作。我剛開始使用Propel ORM。我不知道什麼是錯的。我已經嘗試重新生成php的運行時配置,然後生成新的模型類。我已將Propel與CI集成在一起。我仍然試圖解決這個問題,我不知道是什麼導致了不同的輸出。
你只是在你的表中有更多的項目。就這樣。有關數據庫中第一次測試和第二次測試的數據的任何數據? – j0k
你能否用上面表格的例子來解釋一下。你看到第一個結果是用相同的查詢正確獲得的,它沒有任何改變的話可能會有所不同。仍然困惑。 – Samundra
但是你什麼時候運行這些查詢?一個接一個地?上個月,另一個今天? – j0k