/**
  * Adds an object to the instance pool.
  *
  * Propel keeps cached copies of objects in an instance pool when they are retrieved
  * from the database.  In some cases -- especially when you override doSelect*()
  * methods in your stub classes -- you may need to explicitly add objects
  * to the cache in order to ensure that the same objects are always returned by doSelect*()
  * and retrieveByPK*() calls.
  *
  * @param      Ezer_PropelCase $value A Ezer_PropelCase object.
  * @param      string $key (optional) key to use for instance map (for performance boost if key was already calculated externally).
  */
 public static function addInstanceToPool(Ezer_PropelCase $obj, $key = null)
 {
     if (Propel::isInstancePoolingEnabled()) {
         if ($key === null) {
             $key = (string) $obj->getId();
         }
         // if key === null
         self::$instances[$key] = $obj;
     }
 }
<?php

error_reporting(E_ALL);
require_once 'bootstrap.php';
$config = Ezer_Config::createFromPath('config.xml');
Propel::setConfiguration($config->database->toArray());
Propel::initialize();
// find process
$process = Ezer_PropelStepPeer::retrieveProcessByName('Complex Async Set');
// insert case
$variables = array('title' => 'New Title', 'counter' => array('title' => 'Original Title', 'counts' => array(array('start' => 6, 'stop' => 10), array('start' => 9, 'stop' => 12))));
$case = new Ezer_PropelCase();
$case->setProcessId($process->getId());
$case->setPriority(1);
$case->setStatus(Ezer_IntStep::STEP_STATUS_ACTIVE);
$case->setVariables($variables);
$case->save();
 private function loadCase(Ezer_PropelCase $dbCase)
 {
     $case = new Ezer_Case($dbCase->getId(), $dbCase->getProcessId());
     $case->setVariables($dbCase->getVariables());
     return $case;
 }