Home >Web Front-end >JS Tutorial >Detailed explanation of Hibernate mapping files

Detailed explanation of Hibernate mapping files

php中世界最好的语言
php中世界最好的语言Original
2018-03-07 16:46:111637browse

This time I will bring you a detailed explanation of Hibernate's mapping file. What are the precautions of Hibernate's mapping file? The following is a practical case, let's take a look.

<?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" ><hibernate-mapping>
    <class name="com.troyforever.example.data.bean.Test" table="test" schema="example">
        <id name="id" type="java.lang.Integer" column="id">
            <generator class="identity">
            </generator>
        </id>
        <property name="age" type="java.lang.Integer">
            <column name="age" not-null="true" />
        </property>
        <property name="content" type="java.lang.String">
            <column name="content" length="2000" not-null="true" />
        </property>
        <property name="addtime" type="java.util.Date">
            <column name="addtime" />
        </property>
    </class></hibernate-mapping>

I believe you have mastered the method after reading the case in this article. For more exciting information, please pay attention to the php Chinese website Other related articles!

Related reading:

Detailed graphic explanation of Switchery.js

Summary of using Pixi.js

The above is the detailed content of Detailed explanation of Hibernate mapping files. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn