mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
One of the ManyToOne must not be null #6891
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 @helyakin on GitHub (Dec 17, 2021).
Feature Request
Summary
Hello guy's here is my exemple :
Given the following object
It would be amazing to have and easy constraint attribute that would execute an SQL request stating that the boat CANNOT be without a company and without a user at the same time, and must at list have one of those.
Something who would look like this:
@beberlei commented on GitHub (Dec 18, 2021):
This is something you can enforce in your own logic, for example with Symfony Validator or Doctrine entity event.