1
0
mirror of synced 2025-02-02 21:41:45 +03:00

#6499 #6533 simplifying nullable column check - null coalesce operator makes it *SOMEWHAT* more readable (no miracles)

This commit is contained in:
Marco Pivetta 2017-08-11 22:13:20 +02:00
parent 166c5816b6
commit 1ede3c514f
No known key found for this signature in database
GPG Key ID: 4167D3337FD9D629

View File

@ -1154,7 +1154,11 @@ class UnitOfWork implements PropertyChangedListener
$joinColumns = reset($assoc['joinColumns']);
$calc->addDependency($targetClass->name, $class->name, (int) ! ( ! isset($joinColumns['nullable']) || $joinColumns['nullable'] === true));
$calc->addDependency(
$targetClass->name,
$class->name,
(int) (($joinColumns['nullable'] ?? true) === false)
);
// If the target class has mapped subclasses, these share the same dependency.
if ( ! $targetClass->subClasses) {