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

$model->replicate() fails because of row number #779

Open
nmalcolm opened this issue Mar 6, 2023 · 1 comment
Open

$model->replicate() fails because of row number #779

nmalcolm opened this issue Mar 6, 2023 · 1 comment

Comments

@nmalcolm
Copy link

nmalcolm commented Mar 6, 2023

Summary of problem or feature request

Replicating and saving a new model fails as it tries to insert into the rn column which doesn't exist.

Code snippet of problem

$model = Model::find(1);
$newRecord = $model->replicate();
$newRecord->setTable('whatever');
$newRecord->save();

This can be worked around by using replicate(['rn']) which excludes it.

System details

  • Ubuntu 22.04
  • PHP 8.1
  • Laravel 10
  • Laravel-OCI8 10.3
@github-actions github-actions bot added the stale label Apr 6, 2023
@yajra yajra reopened this Apr 15, 2023
@yajra yajra added for review and removed stale labels Apr 15, 2023
@yajra
Copy link
Owner

yajra commented Apr 15, 2023

Thanks for reporting, will review this as soon as I can. If you can, please do not hesitate to submit a PR.

Repository owner deleted a comment from github-actions bot Apr 15, 2023
Repository owner deleted a comment from github-actions bot Apr 15, 2023
@yajra yajra added the pinned label Apr 15, 2023
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