/**
*(C)Copyright2015BeijingCAISSAInternationalTravelService*Co.,Ltd
*AllRightsReserved.
**/
packagecom.clint.model;
importjava.util.HashMap;
importjava.util.HashSet;
importjava.util.Set;
importcom.caissa.dict.dictitem.model.Dictitem;
*TODO(这里用一句话描述这个类的作用)
@authortodou
@date2015年5月16日下午9:16:47
publicclassDep{
privateStringid;
depname;
privateSet<Person>persons=newHashSet<Person>();
publicSet<Person>getPersons(){
returnpersons;
}
SET/GET省略
}
<?xmlversion="1.0"?>
<!DOCTYPEhibernate-mappingPUBLIC
"-//Hibernate/HibernateMappingDTD3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mappingclassname="com.clint.model.Dep"table="DEP_DEP"id"id"column=type="string"generatorclass="uuid"/>
</id>
property"depname""DEP_NAME"set"Persons"inverse="true"lazy="true"keycolumn"depid"one-to-many"com.clint.model.Person"setclass>
importjava.io.Serializable;
classPersonimplementsSerializable{
privatestaticfinallongserialVersionUID=1L;
name;
address;
depid;
privateDepdep;
SET/GET省略
}
"com.clint.model.Person""person""name""address""depid"@H_247_404@/>
many-to-one"dep"insert="false"update="com.clint.model.Dep"></many-to-one>