name)) { throw new InvalidConfigException('name of RecordSchema must not be empty.'); } if (empty($this->primaryKey)) { throw new InvalidConfigException('primaryKey of RecordSchema must not be empty.'); } if (!is_array($this->primaryKey)) { $this->primaryKey = array($this->primaryKey); } foreach($this->primaryKey as $pk) { if (!isset($this->columns[$pk])) { throw new InvalidConfigException('primaryKey '.$pk.' is not a colum of RecordSchema.'); } } } }