doctrine:migrations:diff不检测非标准目录中实体的映射信息

I have generated an entity named 'MyEntity' with annotation type mapping information using the doctrine:mapping:convert command with the --from-database option.

The entity is in a non-satandard folder which is defined in the doctrine ORM configuration as:

doctrine:
  orm:
    entity_managers:
      default:
        MyEntity:
          mapping: true
          type: annotation
          dir: '%kernel.root_dir%/../src/Path/To/Entity'
          prefix: 'Path\To\Entity'
          is_bundle: false

The class appears in the appropriate directory and has all of the correct properties and annotations however when I try to use the doctrine:migrations:diff command the outcome is a migration that drops the table that the entity was generated from in the first place. This seems to imply that the mapping information generated by the doctrine:mapping:convert command is not being picked up by the doctrine:migrations:diff command. Any insight on this issue would br greatly appreciated.

After returning to the problem I noticed that the generated entity class was in the global namespace as opposed to the one specified by the config file, correcting this immediately fixed the problem.