<?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!-- Mapping file autogenerated by MyEclipse Persistence Tools --> <hibernate-mapping> <class name="orders" table="orders" catalog="hibernate"> <id name="oid" type="integer"> <column name="oid" /> <generator class="identity"></generator> </id> <property name="price" type="float"> <column name="price" precision="12" scale="0" /> </property> <property name="id" type="string"> <column name="id" length="10" /> </property> <many-to-one name="stu" column="id" class="Student"></many-to-one> </class> </hibernate-mapping> <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN" "http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd"> <!-- Mapping file autogenerated by MyEclipse Persistence Tools --> <hibernate-mapping> <class name="Student" table="student" catalog="hibernate"> <id name="id" type="string"> <column name="id" length="10" /> <generator class="assigned"></generator> </id> <property name="name" type="string"> <column name="name" length="20" /> </property> <property name="age" type="integer"> <column name="age" /> </property> <set name="order"> <key column="id"></key> <one-to-many class="orders"/> </set> </class> </hibernate-mapping>
HZK135
相关分类