A TResultMap lets you control how data is extracted from the result of a query, and how the columns are mapped to object properties. A TResultMap can describe the column type, a null value replacement, and complex property mappings including Collections. The can contain any number of property mappings that map object properties to the columns of a result element. The property mappings are applied, and the columns are read, in the order that they are defined. Maintaining the element order ensures consistent results between different drivers and providers. The {@link Class setClass()} property must be a PHP class object or array instance. The optional {@link Extends setExtends()} attribute can be set to the ID of another upon which to base this . All properties of the "parent" will be included as part of this , and values from the "parent" are set before any values specified by this .
С версии: 3.1
Наследование: extends Prado\TComponent
Пример #1
0
 /**
  * @param TResultMap add a new result map to this SQLMap
  * @throws TSqlMapDuplicateException
  */
 public function addResultMap(TResultMap $result)
 {
     $key = $result->getID();
     if ($this->_resultMaps->contains($key) == true) {
         throw new TSqlMapDuplicateException('sqlmap_already_contains_result_map', $key);
     }
     $this->_resultMaps->add($key, $result);
 }