DDC-703: Explicit change tracking not inherited by inheriting classes #869

Closed
opened 2026-01-22 12:53:18 +01:00 by admin · 2 comments
Owner

Originally created by @doctrinebot on GitHub (Jul 20, 2010).

Originally assigned to: @beberlei on GitHub.

Jira issue originally created by user dennis.verspuij:

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.

Originally created by @doctrinebot on GitHub (Jul 20, 2010). Originally assigned to: @beberlei on GitHub. Jira issue originally created by user dennis.verspuij: 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.
admin added the Bug label 2026-01-22 12:53:18 +01:00
admin closed this issue 2026-01-22 12:53:18 +01:00
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2010):

Comment created by @beberlei:

fixed

@doctrinebot commented on GitHub (Aug 8, 2010): Comment created by @beberlei: fixed
Author
Owner

@doctrinebot commented on GitHub (Aug 8, 2010):

Issue was closed with resolution "Fixed"

@doctrinebot commented on GitHub (Aug 8, 2010): Issue was closed with resolution "Fixed"
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: doctrine/archived-orm#869