IDE脚本生成Bug,包含多个EmbeddableEntity属性,并使用@MetaClass注解的实体,在应用程序组件中使用,导致脚本生成错误

先上代码 cuba.rar (2.0 MB)

环境:
CUBA Platform version: 7.2.1
CUBA Studio plugin version: 13.1-191
IntelliJ version: CUBA Studio 2019.2

问题描述:
1.项目A定义一个 可嵌入实体 (public class TestBaseEmbedd extends EmbeddableEntity )
2.项目A定义一个实体 使用@MetaClass注解(public class TestBase extends StandardEntity)
3.实体包含多个可嵌入实体 TestBaseEmbedd

    @Embedded
    @EmbeddedParameters(nullAllowed = false)
    @AttributeOverrides({
            @AttributeOverride(name = "code", column = @Column(name = "SEX_CODE")),
            @AttributeOverride(name = "name", column = @Column(name = "SEX_NAME"))
    })
    protected TestBaseEmbedd sex;

    @Embedded
    @EmbeddedParameters(nullAllowed = false)
    @AttributeOverrides({
            @AttributeOverride(name = "code", column = @Column(name = "JOB_CODE")),
            @AttributeOverride(name = "name", column = @Column(name = "JOB_NAME"))
    })
    protected TestBaseEmbedd job;

    @Embedded
    @EmbeddedParameters(nullAllowed = false)
    @AttributeOverrides({
            @AttributeOverride(name = "code", column = @Column(name = "LEVEL_CODE")),
            @AttributeOverride(name = "name", column = @Column(name = "LEVEL_NAME"))
    })
    protected TestBaseEmbedd level;

4.项目A发布为应用程序组件
5.项目B引用项目A的组件
6.项目B创建数据库,正常生成数据库
7.项目B直接运行 (Debug 或 Run ),出现错误的数据库更新脚本提示,脚本会删除所有 TestBaseEmbedd 字段



8.将错误语句标记为手动执行后,项目可正常运行

已经在英文论坛提出来了,等 CUBA core 团队先看看,英文论坛链接:

感谢反馈,这个已经确认是 bug,会在 Studio 的下一个 bugfix 版本中修复。Youtrack 链接: https://youtrack.cuba-platform.com/issue/STUDIO-8091