Hibernate mapping File parsing

Source: Internet
Author: User

1 <!--declaration of an XML file -2 <?XML version= "1.0" encoding= "Utf-8"?>3 <!--the declaration of the hibernate DTD file -4 <!DOCTYPE hibernate-mapping Public5 "-//hibernate/hibernate Mapping DTD 3.0//en"6 "Http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">7 <!--the root node of the mapping file -8 <hibernate-mapping>9 <!--Ten start of Object Relational mapping: The class element represents the mapping of a table in a class and database.  One The name attribute specifies the Java fully qualified name of the persisted class (or interface); A The Table property specifies the corresponding database table name to be mapped -   - -     <classname= "Org.qiujy.bean.User"Table= "User"> the      <!-- - The object identifier (OID) of the persisted class object and the mapping association of the table's primary key: - The Name property specifies the name of the property in the class as the OID; - the name of the primary key field in the Column property sheet; + The Type property specifies the types of mappings for Hibernate -        - +         <IDname= "id"column= "id"type= "int"> A               <!--specify the object identifier Generator: Class property specifies the class name of the generator - at             <Generatorclass= "Native"/> -         </ID> -          <!-- - mappings for normal properties: - Name Property: The names of the properties, beginning with lowercase letters; - Column property: The corresponding database field name in Type Property: Specifies the type of mapping for Hibernate -  - to         < Propertyname= "Name"column= "Name"type= "string"/> +         < Propertyname= "Age"column= "Age"type= "int"/> -     </class> the </hibernate-mapping>

Hibernate mapping File parsing

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.