我有推进查询
$articles = ArticlesQuery::create()->find();
var_dump($articles);
exit;
它查询文章表(id,users_id,article_category_id,images_id,title,body,approved,created_date,deleted)但我得到的结果非常不同。
预期的结果是
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 'xxx@gmail.com' (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 集成在一起。我仍在尝试解决这个问题,但我不知道是什么导致了不同的输出。