public function relations() { return array_merge(parent::relations(), array('images' => array(self::HAS_MANY, 'AttachmentForm', 'object_id', 'condition' => 'images.object_type = :object_type', 'params' => array('object_type' => Attachment::OBJECT_TYPE_PRODUCT_IMAGE), 'together' => false), 'certificate' => array(self::HAS_ONE, 'CertificateForm', 'product_id'))); }