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

Updating model gives unknown column__model_name #254

Open
bolivir opened this issue Nov 10, 2020 · 0 comments
Open

Updating model gives unknown column__model_name #254

bolivir opened this issue Nov 10, 2020 · 0 comments

Comments

@bolivir
Copy link

bolivir commented Nov 10, 2020

Hi,

Im not sure if im doing the updates on an model correct. I saw in another issue an example, but it is not working and throws me an unknown column __model_name error.

This is what i am doing:
$model = mvc_model('UserMeta'); $userMetaData = $model->find_one_by_verify_token($this->params['token']); if ($userMetaData && $userMetaData->verify_token_valid_until > strtotime('now')) { $userMetaData->verified = 1; $userMetaData->verify_token_valid_until = null; $userMetaData->verify_token = ''; $model->save($userMetaData); }

Weird enough if i unset __model_name and the __id field it is updating the model.

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