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 9049993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:32:36+00:00 2026-06-16T12:32:36+00:00

How can I do a bulk update in symfony using propel when my select

  • 0

How can I do a bulk update in symfony using propel when my select criteria has joins in them? Here’s an example of what I am trying to do.

$conn = Propel::getConnection(BudgetLinePeer::DATABASE_NAME);
// Create a Criteria object that will select the correct rows from the database
$selectCriteria = new Criteria();            
$selectCriteria->add(BudgetLinePeer::IDCOL1, $idcol1, Criteria::EQUAL);
$selectCriteria->addJoin(ProjectBudgetLinePeer::IDBUDGET_LINE, BudgetLinePeer::IDBUDGET_LINE);
$selectCriteria->add(ProjectBudgetLinePeer::IDCLIENT, $idclient, Criteria::EQUAL);
$selectCriteria->add(ProjectBudgetLinePeer::IDPROJECT, $project->getIdproject(), Criteria::EQUAL);
// Create a Criteria object includes the value you want to set
$updateCriteria = new Criteria();
$updateCriteria->add(BudgetLinePeer::STATUS, $status);
// Execute the query
BasePeer::doUpdate($selectCriteria, $updateCriteria, $conn);

I am trying to make an update(update new status) in table BudgetLine.

EDIT: Here’s the snippet of the error I am getting:

Invalid argument supplied for foreach() in
/Applications/MAMP/htdocs/proj_ict_new/trunk/cbm/plugins/sfPropelORMPlugin/lib/vendor/propel/runtime/lib/util/BasePeer.php
on line 369

This is related with the join statement. I tried to use useXYZQuery()->filterCon()->endUse(). but ended up with same error again.

  • 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-16T12:32:37+00:00Added an answer on June 16, 2026 at 12:32 pm

    I was able to figure out another way to solve this problem. Here’s the solution:

    $budgetLine_ids = BudgetLineQuery::create()
                     ->filterByIdcol1($col1)
                     ->useProjectBudgetLineQuery()
                     ->filterbyIdproject()->endUse()->find()->toArray('budgetline_id');
    
    $selectCriteria = BudgetLineQuery::create()->filterByIdbudgetLine(array_keys($budgetLine_ids));      
    
    // Create a Criteria object includes the value you want to set
    $updateCriteria = new Criteria();
    $updateCriteria->add(BudgetLinePeer::STATUS, $status);
    // Execute the query
    BasePeer::doUpdate($selectCriteria, $updateCriteria, $conn);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to bulk-update entities using a StatelessSession. Because it's stateless, NHibernate doesn't auto-cascade
How can i update bulk data in sql server 2005 by sending the data
I'm using SQLAlchemy with a Postgres backend to do a bulk insert-or-update. To try
I'm using Nick Johnson's Bulk Update library on google appengine (http://blog.notdot.net/2010/03/Announcing-a-robust-datastore-bulk-update-utility-for-App-Engine). It works wonderfully
I have to perform a bulk update on a table. Making a fast example
I need to bulk update a datastore with a CSV file (250,000 rows) using
I know you can do bulk XML inserts into SQL Server 2005 tables from
Can I authenticate with just Google account username and password instead of using OAuth?
Can we change the default action of the edit selected row button? Here is
I'm using a slider as user input for a screen. Basically it's a bulk

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.