我有一个问题:假设我有两个类 User 和 Employee,Employee 扩展 User,在 User 中我有 @Inheritance(strategy=InheritanceType.JOINED)。以这种方式获取员工是否正确“来自用户 p WHERE p.login = :login AND p.password = :password”; 登录名和密码属性在用户中。
错误:
org.hibernate.hql.internal.ast.QuerySyntaxException: USER is not mapped [FROM USER p WHERE p.login = :login AND p.password = :password]