Пример #1
0
 /**
  *	This function is defined to retrieve
  *	entities having an unique (technical) identifier
  *	name "id".
  *
  * @param DBEntity $obj a entity (used for the correct format).
  *
  */
 function getById($obj, $id)
 {
     $keys = $obj->getPrimaryColumns();
     $where = array();
     foreach ($keys as $key => $col) {
         $where[$key] = $id;
     }
     $unique = $this->selectUnique($obj, $where);
     return $unique;
 }