hibernate多表查询问题

问题描述:

[code="java"]
//产品
public class AykjProducter implements Serializable{

private int id;
private String producterId;
private Date createtime; //商品录入时间
private String proName; //商品名字
private String proInfo; //商品信息
private float proPrice; //商品价格(单价)
private int proNum; //产品数量
private int saleway; //出售方式
private AykjUser aykjUserId; //用户
private AykjProducterSort aykjProducterSortId; //产品种类
}
[/code]
[code="java"]
//产品分类
public class AykjProducterSort implements Serializable{
private int id;
private String sortname; //产品分类名
private AykjProducterSort aykjParentPid; //父分类
private Set aykjChildrenId;
}
[/code]
[code="java"]
//产品属性
public class AykjProperties implements Serializable {
private int id;
private String name; //商品属性
private String description; //属性描述
private AykjProperties aykjparent; //父
private Set aykjchildren; //子
}
[/code]

[code="java"]
//产品的属性类
public class AykjProducterProperties {
private int id;
private AykjProducter aykjProducterId;//商品ID
private AykjProperties aykjPropertiesId;//属性ID
}
[/code]

一个表单,可能上有面五张表的信息,怎么根据这些信息表到相应的Producter产品的信息
[b]问题补充:[/b]
我要写一个方法,来面对所以可能出现的情况啊,用SQL显示不太现实吧...

在配置的时候记得一定得要延迟加载哟..不然性能就惨了.

可以用原始的SQL查询啊..

用Query查询.