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

How to change primary key name #17

Closed
Er-Kalpesh opened this issue May 30, 2020 · 1 comment
Closed

How to change primary key name #17

Er-Kalpesh opened this issue May 30, 2020 · 1 comment

Comments

@Er-Kalpesh
Copy link

Er-Kalpesh commented May 30, 2020

I am getting the following error

Exception 'yii\base\InvalidArgumentException' with message 'Key "id" is not a column name and can not be used as a filter'

@Er-Kalpesh
Copy link
Author

Er-Kalpesh commented May 30, 2020

It's my mistake, I didn't checked code by myself.
its simply:

return [
            'change-status' => [
                'class' => EditableAction::class,
                'modelClass' => YourModel::class,
                'pkColumn' => 'primary-key here'
            ],
        ];

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

No branches or pull requests

1 participant