ZF2, Oracle, SlmQueueDoctrine, ClearObjectManagerStrategy is not working ZF2, Oracle, SlmQueueDoctrine, ClearObjectManagerStrategy is not working oracle oracle

ZF2, Oracle, SlmQueueDoctrine, ClearObjectManagerStrategy is not working


If you mean that it doesn't fully clear then apparently this is not a bug, but expected behavior.

You can check the documentation chapter 7.5. for behavior on calling the clear method:

When EntityManager#clear() is invoked, all entities that are currently managed by the EntityManager instance become detached.

In your comment you said "it does not flush object manager's and current transaction". This is not an action you can expect from calling clear. Detach results in the following actions according to the documentation:

The semantics of the detach operation, applied to an entity X are as follows:

  • If X is a managed entity, the detach operation causes it to become detached. The detach operation is cascaded to entities referenced by X, if the relationships from X to these other entities is mapped with cascade=DETACH or cascade=ALL (see “Transitive Persistence”). Entities which previously referenced X will continue to reference X.
  • If X is a new or detached entity, it is ignored by the detach operation.
  • If X is a removed entity, the detach operation is cascaded to entities referenced by X, if the relationships from X to these other entities is mapped with cascade=DETACH or cascade=ALL (see “Transitive Persistence”). Entities which previously referenced X will continue to reference X.