@Table("t_menu")
public class Menu {
private int id;
private String name;
@Column("pid")
private int parentId;
@Column("ct")
private long createTime;
@Column("ut")
private long updateTime;
@One(target=Menu.class, field="parentId")
private Menu parentMenu;
@Many(target=Menu.class, field="parentId")
private List subMenus;
}
List top = dao().query(Menu.class, Cnd.where("parentId", "=", 0));
top = dao().fetchLinks(top, null);
多层查询如何实现?