Skip to content

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

@nmalcolm

Description

@nmalcolm

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions