you cannot have a column called owner_id if you have any behavior attached to your base model
I think it would make more sense to ignore behaviors when creating relation names as some relation names will be illformed.
What steps will reproduce the problem?
run gii model generator with any behavior already attached to the basemodel and have a column name which relation name will share the name of any public behavior property.
Any behavior which inherits from the attributebehavior (timestamp,blamable) will cause the
value_id relation name to be getValue0()
the attributesbehavior will cause the
order_id relation name to be getOrder0()
and ALL behaviors will cause
owner_id relation name to be getOwner0()
A solution would be to
protected function generateRelationName($relations, $table, $key, $multiple)
...
//replace
while ($baseModel->hasProperty(lcfirst($name))) {
//with
while ($baseModel->hasProperty(lcfirst($name), true, false)) {
`
example
### What's expected?
`public function getOwner()`
### What do you get instead?
`public function getOwner0()`
### Additional info
you cannot have a column called owner_id if you have any behavior attached to your base model
I think it would make more sense to ignore behaviors when creating relation names as some relation names will be illformed.
What steps will reproduce the problem?
run gii model generator with any behavior already attached to the basemodel and have a column name which relation name will share the name of any public behavior property.
Any behavior which inherits from the attributebehavior (timestamp,blamable) will cause the value_id relation name to be
getValue0()
the attributesbehavior will cause the order_id relation name to be
getOrder0()
and ALL behaviors will cause
owner_id relation name to be
getOwner0()
A solution would be to