Hibernate basic Mapping File

Source: Internet
Author: User

<?XML version= "1.0"?><!DOCTYPE hibernate-mapping Public "-//hibernate/hibernate mapping DTD 3.0//en" "Http://www.hibernate.org/dtd/hib Ernate-mapping-3.0.dtd "><hibernate-mapping Package= "Com.fengye.hibernate">    <!--class: The mapping of entity classes and tables cannot be associated with a database The keyword dynamic-update: the updated SQL statement does not contain null values. Dynamic organization SQL statement Dynamic-insert: Insert does not contain empty attribute columns , for dynamic organization of SQL statements select-before-update: query first on update -    <classname= "Com.fengye.hibernate.basic.BasicMap"Table= "Basic_map"dynamic-update= "true"Dynamic-insert= "true"select-before-update= "true">        <IDname= "id"type= "Java.lang.Integer">            <columnname= "ID"/>            <!--Specify how primary keys are generated, native: Using Database local methods -            <Generatorclass= "Native"/>            <!--Hilo -            <!--<generator class= "Hilo" > <param name= "table" >HI_TABLE</param>            <param name= "column" >NEXT_VAL</param> <param name= "Max_lo" >10</param> </generator> -        </ID>        <!--Normal Properties-property -        < Propertyname= "title"type= "Java.lang.String"column= "TITLE">        </ Property>        < Propertyname= "Author"type= "Java.lang.String"Index= "News_index">            <columnname= "AUTHOR"/>        </ Property>        <!--time (Year/month/day, specific time) -        < Propertyname= "Date"type= "Date"/>        < Propertyname= "Time"type= "Time"/>        < Propertyname= "Timestamp"type= "Timestamp"/>        <!--Boolean -        < Propertyname= "isused"type= "Yes_no">            <columnname= "isused"Sql-type= "varchar (1)"></column>        </ Property>        <!--enum -        < Propertyname= "Gender">            <columnname= "Gender">            </column>            <typename= "Org.hibernate.type.EnumType">                <paramname= "Enumclass">Com.fengye.hibernate.basic.Gender</param>                <paramname= "type">12</param>            </type>        </ Property>        < Propertyname= "desc"Formula= "(select Concat (author, ': ', title) from Basic_map n WHERE n.id = id)"/>        <!--Large Text -        < Propertyname= "Content">            <columnname= "Content"Sql-type= "Mediumtext"/>        </ Property>        < Propertyname= "image">            <columnname= "IMAGE"Sql-type= "Mediumblob"></column>        </ Property>        <!--Component -        <Componentname= "Component"class= "Com.fengye.hibernate.basic.Component">            <Parentname= "Map"/>            < Propertyname= "Component1"column= "Component1"/>            < Propertyname= "Component2"column= "Component2"/>        </Component>    </class></hibernate-mapping>

Hibernate basic Mapping File

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.