Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Integrity constraint violation: Update Persons #2011

@devansh-webkul

Description

@devansh-webkul

Discussed in #2009

Originally posted by jaracj February 8, 2025
Hello, good afternoon.
I am having a problem that when creating a contact in "Persons" and then saving it without having entered any organization. When trying to update the contact and add the name of an organization, the system fails and returns me

"SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (laravelcrm.persons, CONSTRAINT persons_user_id_foreign FOREIGN KEY (user_id) REFERENCES users (id) ON DELETE SET NULL)"

Could you help me? I don't understand how to solve it.

PS: Attached screen print with 3 messages and 2 exceptions.
Exception
Message

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions