Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-2886

Entity of Base class in STI can't be persisted because of discriminator column isn't nullable

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Invalid
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Security Level: All
    • Labels:
      None

      Description

      When using single table inheritance, discriminator field doesn't created as nullable... so when you persist Base class.. it has null value and you get MySQL violation

        Activity

        Hide
        Brazhnyk Yuriy added a comment -
        Show
        Brazhnyk Yuriy added a comment - Some code for this issue https://gist.github.com/USvER/d1699c75ec687b4587da
        Hide
        Brazhnyk Yuriy added a comment -

        As was pointed out by Bittarman on IRC, base class was not included in DiscriminatorMap...
        Closing as not an issue

        Show
        Brazhnyk Yuriy added a comment - As was pointed out by Bittarman on IRC, base class was not included in DiscriminatorMap... Closing as not an issue
        Hide
        Brazhnyk Yuriy added a comment -

        Not an issue

        Show
        Brazhnyk Yuriy added a comment - Not an issue

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Brazhnyk Yuriy
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: