File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 1010use cebe \yii2openapi \lib \items \Attribute ;
1111use cebe \yii2openapi \lib \items \DbModel ;
1212use cebe \yii2openapi \lib \items \ValidationRule ;
13+ use yii \helpers \Inflector ;
1314use function count ;
1415use function implode ;
1516use function in_array ;
@@ -161,7 +162,7 @@ private function addExistRules(array $relations):void
161162 $ this ->addStringRule ($ attribute );
162163 }
163164
164- $ targetRelation = AttributeResolver::relationName ($ attribute ->propertyName , $ attribute ->fkColName );
165+ $ targetRelation = AttributeResolver::relationName (Inflector:: variablize ( $ attribute ->camelName ()) , $ attribute ->fkColName );
165166 $ this ->rules [$ attribute ->columnName . '_exist ' ] = new ValidationRule (
166167 [$ attribute ->columnName ],
167168 'exist ' ,
You can’t perform that action at this time.
0 commit comments