Doctrine 2 - ORM
  1. Doctrine 2 - ORM
  2. DDC-703

Explicit change tracking not inherited by inheriting classes

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0-BETA3
    • Fix Version/s: 2.0-BETA4
    • Component/s: ORM
    • Security Level: All
    • Labels:
      None

      Description

      I have a class B that inherits from A using single table inheritance strategy with discriminator column.
      On class A I have defined @ChangeTrackingPolicy ("DEFERRED_EXPLICIT"), which should be inherited by B, but it is not currenlty.

      This means that when I have a managed instance $b of B $em->getClassMetadata(get_class($b))->isChangeTrackingDeferredExplicit()
      does not return TRUE and calling $em->persist($b) and $em->flush() does not save any changes to $b.

      If I set @ChangeTrackingPolicy ("DEFERRED_EXPLICIT") on class B it does work. So either way I think B should inherit the change tracking policy of A, or it should have IMPLICT as default like A but not none.

        Activity

        Hide
        Benjamin Eberlei added a comment -

        fixed

        Show
        Benjamin Eberlei added a comment - fixed

          People

          • Assignee:
            Benjamin Eberlei
            Reporter:
            Dennis Verspuij
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: