Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8503223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:41:59+00:00 2026-06-11T01:41:59+00:00

I have propel query $articles = ArticlesQuery::create()->find(); var_dump($articles); exit; which queries the article table

  • 0

I have propel query

$articles = ArticlesQuery::create()->find();
var_dump($articles);
exit;

which queries the article table (id, users_id, article_category_id, images_id, title, body, approved, created_date, deleted) but the result I get is very different.

expected result is

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

but the result I get is

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

The same query worked earlier. I have just started to work with Propel ORM. I don’t know what is going wrong. I have already tried regenerating the runtime configuration for php and then generated new model classes. I have integrated Propel with CI. I am still trying to solve this problem and I have no idea what is causing the different output.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T01:42:00+00:00Added an answer on June 11, 2026 at 1:42 am

    Today, I made a really stupid mistake and cost me hours of pain.

    Actually in the morning I edited a propel runtime core file “runtime/lib/query/ModelCriteria.php” and replaced the

    $this->modelPeerName = constant($this->modelName . '::PEER'); 
    // with 
    $this->modelPeerName = 'UsersPeer'
    

    which caused propel to return the data from users table only. @j0k Thanks for the continuous support that kept me with debugging this problem.

    I replaced the code earlier because the code generated by propel was not working for the UsersQuery only and was not able to locate constant($this->modelName . ‘::PEER’); properly.

    Hope this won’t happen to anyone and I will have habbit of keeping track of changes I made. After finding the actual error, I reverted to the original source and the query began to work as before.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i use propel for database interaction. Now i have to create a query like
Im writing sql query and i have issue which i cannot fix. I'm trying
I have a table which will potentially store hundreds of thousands of integers: desc
I have a table with timestamps. What is the proper query to get the
I have in my project old version (1.2) Propel. I would like make query:
In a basic blog application, I have an articles module which allows me to
we using symfony 1.0. We have an module work with Propel objects. The sql-querys
I've just started working with Propel and I love it, but I have a
In my application at some point, I have to call the Propel library version
I have the following code which definitely returns a proper data result if I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.