2012年9月18日

摘要: hibernate默认的,以及网络上的主流支持left join的表关系是one-to-many的,可以使用left join fetch(需要配置lazy="true" fetch="select"),也可以使用Criteria或者CriteriaQuery(link1link2)来进行查询。对于many-to-one,首先我们先建两个model:@Entitypublic class ClassOne { public String id; public boolean isDeleted; }@Entitypublic class ClassTwo 阅读全文
posted @ 2012-09-18 13:47 timelyxyz 阅读(940) 评论(0) 推荐(0) 编辑

导航