Student.hbm.xml <?xml version= "1.0" encoding= "Utf-8"?>
<! DOCTYPE hibernate-mapping Public "-//hibernate/hibernate mapping DTD 3.0//en"
"Http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd" >
<!--
Mapping file autogenerated by MyEclipse persistence Tools
-->
<class name= "edu.dgut.ke.model.Student" table= "Student"Lazy= "true">
<id name= "id" type= "java.lang.String" >
<column name= "ID" length= "/>"
<generator class= "Uuid.hex"/>
</id>
<many-to-one name= "certificate"
Class= "Edu.dgut.ke.model.Certificate"
Unique= "true"
Column= "Cardid"
Cascade= "All"
>
</many-to-one>
<many-to-one name= "Team" class= "Edu.dgut.ke.model.Team" >
<column name= "Teamid" length= "not-null=" "true"/>
</many-to-one>
<property name= "Studentname" type= "java.lang.String" >
<column name= "Studentname" length= "not-null=" true "unique=" true "/>
</property>
</class>
Note: Deferred loading of one-to-one relationships is slightly different than other relationships. Many-to-one Delay loading is the class tag in the configuration file Set lazy= "True" on, One-to-many and Many-to-many delay loading is set lazy= "true" in the set label. and one-to-one not just in classs The label setting is Lazy= "true" and you want to set constrained= "true" in the One-to-one tab. If you do not set constrained= "true", the one-to-one query uses the default pre-crawl policy (fetch= "join").
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.