mirror of
https://github.com/doctrine/orm.git
synced 2026-03-24 06:52:09 +01:00
DDC-856: Boolean discriminator field for single table inheritance does not work as expected with MySQL #1059
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 @doctrinebot on GitHub (Nov 3, 2010).
Originally assigned to: @beberlei on GitHub.
Jira issue originally created by user sebak:
Hello,
I have a a single table inheritance, with a boolean discriminator field, see: http://pastie.org/1269467
As MySQL does not have a boolean field, true / false should be translated to 1/0 (as it uses a TINYINT(1) field instead).
If I use 1 / 0 in the annotation instead of true / false it works, but than it's not boolean anymore...
So it should either translate that, or mention this in the documentation (although vendor specific exceptions should be avoided imo).
@doctrinebot commented on GitHub (Nov 4, 2010):
Comment created by @beberlei:
This is not supported, i suggest using smallint and 0 / 1 instead.
@doctrinebot commented on GitHub (Nov 11, 2010):
Comment created by @beberlei:
Throwing an exception now on using boolean, object, array, datetime, date or time for the discriminator column.
@doctrinebot commented on GitHub (Nov 11, 2010):
Issue was closed with resolution "Fixed"