日期:2014-05-17 浏览次数:20758 次
public class Room {
private Integer room_id;
private Set<Liveinfo> liveinfo_set;
<set name="liveinfo_set" inverse="true" lazy="false">
<key column="room_id" ></key>
<one-to-many class="Liveinfo" />
</set>
@Override
public Room get(Integer room_id) {
return (Room)getHibernateTemplate().get(Room.class, room_id);
}
<set name="liveinfo_set" inverse="true" lazy="true">
<key column="room_id" ></key>
<one-to-many class="Liveinfo" />
</set>