$model->replicate() fails because of row number
nmalcolm opened this issue · comments
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
Thanks for reporting, will review this as soon as I can. If you can, please do not hesitate to submit a PR.