嗨,我是编写 HQL 查询的新手,请帮帮我.....我的 Hibernate 有三个 ValueObject,即。
@Entity
@Table(name="user")
public class UserVO {
@Id
@Column(name="S_ID")
private String s_id;
@Column(name="FIRSTNAME")
private String firstName;
private String email;
}
CourseVO课程
@Entity
@Table(name="course")
public class CourseVO
{
@Id
@Column(name="S_ID")
public String s_id;
@Column(name="NAME")
public String name;
}
技能组 VO
@Entity
@Table(name="skillset")
public class SkillsetVO
{
@Id
@Column(name="S_ID")
public String s_id;
@Column(name="COURSE_ID")//Foreign Key "USER"
public String course_id;
@Column(name="USER_ID")//Foreign key "COURSE"
public String user_id;
@Column(name="TEACH_EXP")
public String teach_Exp;
}
HQL
现在如何使用查询的 USER 表的 EMAIL 获取 FirstName、NAME、TEACH_EXP 值的值