mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
Self referencing associate results in Not null violation #6948
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @NotionCommotion on GitHub (Mar 11, 2022).
Bug Report
Summary
Unable to persist an entity with a not-null self referencing association, yet I could do so doing directly with PDO.
Current behavior
Receive a not null violation even though the entity's value is not null.
How to reproduce
Output:
Expected behavior
Either a successful insert or at a minimum, a foreign key constraint as not all databases support deferrable constrains (note that I am using PostgreSQL).