|
@@ -318,7 +318,16 @@ DOC;
|
|
|
*/
|
|
|
public function uniqueKey(){
|
|
|
if(\$this->uniqKeys !== null) return \$this->uniqKeys;
|
|
|
+DOC;
|
|
|
+ if($primaryKey) {
|
|
|
+ $next[] = "\t\treturn array('". join("','", $primaryKey). "');";
|
|
|
+ }else {
|
|
|
+
|
|
|
+ $next[] = <<<DOC
|
|
|
throw new \Exception('请设置`{$tableInfo['table']}`表更新唯一值');
|
|
|
+DOC;
|
|
|
+ }
|
|
|
+ $next[] = <<<DOC
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -347,7 +356,15 @@ DOC;
|
|
|
*/
|
|
|
public function exclude(){
|
|
|
if(\$this->exclude !== null) return \$this->exclude;
|
|
|
- return array();
|
|
|
+DOC;
|
|
|
+ if($primaryKey) {
|
|
|
+ $next[] = "\t\treturn array('". join("','", $primaryKey). "');";
|
|
|
+ }else{
|
|
|
+ $next[] = <<<DOC
|
|
|
+ return array();
|
|
|
+DOC;
|
|
|
+ }
|
|
|
+ $next[] = <<<DOC
|
|
|
}
|
|
|
/**
|
|
|
* 添加时验证的字段,自行添加
|