Changeset 1591
- Timestamp:
- 03/02/10 20:57:59 (10 days ago)
- Location:
- branches/1.5
- Files:
-
- 3 added
- 4 modified
-
docs/behavior/query_cache.txt (added)
-
docs/guide/07-Behaviors.txt (modified) (2 diffs)
-
generator/default.properties (modified) (1 diff)
-
generator/lib/behavior/query_cache (added)
-
generator/lib/behavior/query_cache/QueryCacheBehavior.php (added)
-
runtime/lib/query/Criteria.php (modified) (3 diffs)
-
runtime/lib/query/ModelCriteria.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/1.5/docs/guide/07-Behaviors.txt
r1539 r1591 136 136 == Bundled Behaviors == 137 137 138 Propel currently bundles eightbehaviors. Check the behavior documentation for details on usage:138 Propel currently bundles nine behaviors. Check the behavior documentation for details on usage: 139 139 140 140 * [wiki:Users/Documentation/1.5/Behaviors/alternative_coding_standards alternative_coding_standards] … … 145 145 * [wiki:Users/Documentation/1.5/Behaviors/sortable sortable] 146 146 * [wiki:Users/Documentation/1.5/Behaviors/nested_set nested_set] 147 * [wiki:Users/Documentation/1.5/Behaviors/query_cache query_cache] 147 148 * And [wiki:Users/Documentation/1.5/Inheritance#ConcreteTableInheritance concrete_inheritance], documented in the Inheritance Chapter even if it's a behavior 148 149 -
branches/1.5/generator/default.properties
r1545 r1591 255 255 propel.behavior.sluggable.class = behavior.sluggable.SluggableBehavior 256 256 propel.behavior.concrete_inheritance.class = behavior.concrete_inheritance.ConcreteInheritanceBehavior 257 propel.behavior.query_cache.class = behavior.query_cache.QueryCacheBehavior -
branches/1.5/runtime/lib/query/Criteria.php
r1586 r1591 210 210 211 211 /** 212 * Get the criteria map .212 * Get the criteria map, i.e. the array of Criterions 213 213 * @return array 214 214 */ … … 408 408 public function getCriterion($column) 409 409 { 410 if ( isset ( $this->map[$column] ) ) { 411 return $this->map[$column]; 412 } 413 return null; 410 return $this->map[$column]; 414 411 } 415 412 … … 1119 1116 return $this->having; 1120 1117 } 1121 1118 1122 1119 /** 1123 1120 * Remove an object from the criteria. -
branches/1.5/runtime/lib/query/ModelCriteria.php
r1587 r1591 1542 1542 return $this->containsKey($key) ? $this->addAnd($key, $value, $comparison) : $this->add($key, $value, $comparison); 1543 1543 } 1544 1545 /** 1546 * Get all the parameters to bind to this criteria 1547 * Does part of the job of BasePeer::createSelectSql() for the cache 1548 * 1549 * @return array list of parameters, each parameter being an array like 1550 * array('table' => $realtable, 'column' => $column, 'value' => $value) 1551 */ 1552 public function getParams() 1553 { 1554 $params = array(); 1555 $dbMap = Propel::getDatabaseMap($this->getDbName()); 1556 1557 foreach ($this->getMap() as $criterion) { 1558 1559 $table = null; 1560 foreach ($criterion->getAttachedCriterion() as $attachedCriterion) { 1561 $tableName = $attachedCriterion->getTable(); 1562 1563 $table = $this->getTableForAlias($tableName); 1564 if (null === $table) { 1565 $table = $tableName; 1566 } 1567 1568 if (($this->isIgnoreCase() || $attachedCriterion->isIgnoreCase()) 1569 && $dbMap->getTable($table)->getColumn($attachedCriterion->getColumn())->isText()) { 1570 $attachedCriterion->setIgnoreCase(true); 1571 } 1572 } 1573 1574 $sb = ''; 1575 $criterion->appendPsTo($sb, $params); 1576 } 1577 1578 $having = $this->getHaving(); 1579 if ($having !== null) { 1580 $sb = ''; 1581 $having->appendPsTo($sb, $params); 1582 } 1583 1584 return $params; 1585 } 1544 1586 1545 1587 /**
