mirror of
https://github.com/doctrine/orm.git
synced 2026-04-29 09:23:20 +02:00
Associations - threat empty string as null and do not load related entity #5301
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 @majkel89 on GitHub (Oct 24, 2016).
Originally assigned to: @Ocramius on GitHub.
Is it possible to configure doctrine to use null,
empty stringand/orzeroas actualnull valueso that related entity is not loaded andDoctrine\ORM\EntityNotFoundExceptionis not thrown.I have external database that i have no control over that uses empty strings to to mark null value.
@Ocramius commented on GitHub (Oct 24, 2016):
Big explanation at https://stackoverflow.com/questions/15502408/doctrine-2-use-default-0-values-instead-of-null-for-relation
Closing here.
NULLmeansNULL, other things are notNULL, and won't be supported, as we'd just be opening a can of worms about FK integrity support in different RDBMSs