首页 > 解决方案 > ORO 从 3.1.19 迁移到 4.1.2

问题描述

我们正在从 ORO 3.1.19 迁移到 4.1.2,并且遇到了迁移问题。

$ php bin/console --env=prod oro:migration:load --force --show-queries
Process migrations...
  > Oro\Bundle\EntityExtendBundle\Migration\LoadEntityConfigStateMigration
  > Oro\Bundle\MigrationBundle\Migration\UpdateBundleVersionMigration
  > Oro\Bundle\EntityExtendBundle\Migration\RefreshExtendCacheMigration

    Prepare entity config
    Clear extended entity cache
    Dump the configuration of extended entities to the cache
    Clear entity metadata cache
    Warm   up entity metadata cache

    In RuntimeReflectionService.php line 63:

    Property Oro\Bundle\AttachmentBundle\Entity\Attachment::$account_8d93c122 does not exist

我们尝试清除缓存,实体配置缓存并没有成功

 php bin/console --env=prod oro:entity-config:cache:clear
 php bin/console --env=prod oro:entity-config:cache:warmup

任何帮助或反馈将不胜感激。

谢谢

编辑

我们可以看到,Attachment::$account_8d93c122在初始容器创建期间,Reflection 找到了,但在实体缓存预热期间没有

标签: orocrm

解决方案


当实体元数据未准备好时,请确保您没有使用原则 ORM 服务(@doctrine、@entity_manager 等)。

通常,在编译器传递或迁移中使用 ORM 时会出现错误。


推荐阅读