Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not found table error when using base model differ from yii\db\ActiveRecord #221

Open
StalkAlex opened this issue Feb 12, 2018 · 2 comments

Comments

@StalkAlex
Copy link
Contributor

Our models are using AuditActiveRecord as base class instead of default Yii version yii\db\ActiveRecord.
AuditActiveRecord just overrides basic framework version and adds audit behavior, it cannot have db table.
Generator thinks otherwise:)

default

@schmunk42
Copy link
Owner

Does AuditActiveRecord define a relation or a default table name? Can you show its source?

@StalkAlex
Copy link
Contributor Author

StalkAlex commented Feb 12, 2018

use PHPKitchen\Domain\DB\Record;

class AuditActiveRecord extends Record
{
    public function behaviors()
    {
        return [
            'AuditTrailBehavior' => [
                'class'=>'bedezign\yii2\audit\AuditTrailBehavior',
                'active' => true,
                'dateFormat' => 'Y-m-d H:i:s',
            ]
        ];
    }
}

Maybe problem with php-kitchen extension and its base class

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants