yajra / laravel-oci8

Oracle DB driver for Laravel via OCI8

Home Page:https://yajrabox.com/docs/laravel-oci8

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

nmalcolm opened this issue · comments

commented

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.