Skip to content

Postgres: Can't create entry #67

@helloiamlukas

Description

@helloiamlukas

Description

When using Postgres, the following error will be thrown when trying to create a new entry:

SQLSTATE[23502]: Not null violation: 7 ERROR:  null value in column "id" violates not-null constraint

The driver tries to use null as value for the id column for new entries.

return $class::findOrNew($this->id())->fill([
'id' => $this->id(),
'origin_id' => $this->origin()?->id(),

Can we just delete this line, so that the id will not be written? Or is there any case where we need the id to be there?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions