public function getRecord($name,$alias)
  {
    if(isset($this->_records[$name][$alias]))
    {
      if(is_string($this->_records[$name][$alias]))
      {
        $row=$this->_rows[$name][$alias];
        $model=ActiveRecord::model($this->_records[$name][$alias]);
        $key=$model->getRawTableNameSchema()->primaryKey;
        if(is_string($key))
          $pk=$row[$key];
        else
        {
          foreach($key as $k)
            $pk[$k]=$row[$k];
        }
        $this->_records[$name][$alias]=$model->find($pk);
      }
      return $this->_records[$name][$alias];
    }
    else
      return false;
  }