I’m using symfony 1.3 with Propel 1.4. I need to use a prepared query that will be used inside a loop changing the values of bound parameters.
Is it possible to do this with Propel 1.4? I want to retrieve results as objects so don’t want to use raw SQL if I can help it.
Propel does not seem to support this out of the box. Take one of the examples, the
Bookclass.BookPeer::doSelect()callsBookPeer::doSelectStmt()and passes the result toBookPeer::populateObjects().BookPeer::doSelectStmt()callsBasePeer::doSelect(), which always callsBasePeer::createSelectSql()to create the SQL statement, prepares it, and passes it toBasePeer::populateStmtValues()to actually bind the values.You can take code from these methods to get something like this (without exception or transaction handling):