public function setRecordPk($value) { $this->clearRecordObject(); $val = TPropertyValue::ensureArray($value); $this->setViewState('PK', count($val) > 0 ? $val : null); }