// Initialize the Propel configuration $config = Propel\Runtime\Propel::getDefaultConfiguration(); $config->setParameter('instance_pooling', false); Propel\Runtime\Propel::initialize($config); // Run some database queries using Propel $books = BookQuery::create()->find(); $authors = AuthorQuery::create()->find();
// Run a query with instance pooling disabled $book = BookQuery::create() ->disableInstancePooling() ->findPk(123);In this example, we use the disableInstancePooling() method to disable instance pooling for a specific query. This can be useful if we know that the object we're querying will not be requested again, and we want to free up memory by not keeping it in the object pool. Package library: Propel\ORM.