将Framework 2 Ebean和InheritanceType作为JOINED播放

c4k*_*c4k 11 inheritance joined-subclass ebean playframework-2.0

经过对谷歌的一些研究,我没有找到任何有我问题的人,这就是我在这里发布的原因.在我的应用程序中,我有三个实体:用户(摘要),客户,代理商.客户和代理商扩展用户.这是用户的代码:

@Entity
@Inheritance(strategy = InheritanceType.JOINED)
public abstract class User extends AbstractModel {

    @Column(unique = true)
    @NotNull
    @Email
    public String email;

    @NotNull
    public String password;

}
Run Code Online (Sandbox Code Playgroud)

问题是生成的模式只创建一个包含User,Customer和Agency字段的表,这通常是InheritanceType.SINGLE_TABLE(默认)的行为.

使用Ebean和@Inheritance注释有什么问题吗?我尝试了InheritanceType.TABLE_PER_CLASS,它也没有用.我从来没有使用JPA这个问题.有人可以帮忙吗?

非常感谢 ;)

c4k*_*c4k 6

我更好地阅读了EBean的文档和限制:http://ebean-orm.github.io/docs/mapping/jpa/

只有单表继承

目前只支持单表继承.其他两个继承策略被视为增强请求,将在功能发布中引入.