公共属性:
<?xml version="1.0"?>
<!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.derong.auction.model.TGoodsCommon" table="T_GOODS_COMMON" schema="HELLO" dynamic-update="true">
<comment>ÉÌÆ·¹«¹²ÊôÐÔ±í</comment>
<id name="goodId" type="string">
<column name="GOOD_ID" length="32" />
<generator class="uuid" />
</id>
<many-to-one name="TMember" class="com.derong.auction.model.TMember" fetch="join" cascade="none">
<column name="MEM_ID" length="32" />
</many-to-one>
<property name="initprice" type="java.lang.Float">
<column name="INITPRICE" precision="126" scale="0" />
</property>
<property name="dealprice" type="java.lang.Float">
<column name="DEALPRICE" precision="126" scale="0" />
</property>
<property name="starttime" type="string">
<column name="STARTTIME" length="20" />
</property>
<property name="overtime" type="string">
<column name="OVERTIME" length="20" />
</property>
<property name="status" type="string">
<column name="STATUS" length="10" />
</property>
<property name="scantime" type="int">
<column name="SCANTIME" />
</property>
<one-to-one name="TLand" class="com.derong.auction.model.TLand" cascade="none"></one-to-one>
<one-to-one name="TChinaware" class="com.derong.auction.model.TChinaware" cascade="none"></one-to-one>
<set name="TPictrues" table="T_PICTRUE" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="GOOD_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TPictrue" />
</set>
<set name="TEstimates" table="T_ESTIMATE" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="GOOD_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TEstimate" />
</set>
<set name="TCollections" table="T_COLLECTION" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="GOOD_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TCollection" />
</set>
<one-to-one name="TPainting" class="com.derong.auction.model.TPainting"></one-to-one>
<set name="TBidRecords" table="T_BID_RECORD" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="GOOD_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TBidRecord" />
</set>
<one-to-one name="TAgeAmount" class="com.derong.auction.model.TAgeAmount" cascade="none"></one-to-one>
</class>
</hibernate-mapping>
会员:
<?xml version="1.0"?>
<!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.derong.auction.model.TMember" table="T_MEMBER" schema="HELLO" dynamic-update="true">
<comment>»áÔ±±í</comment>
<id name="memId" type="string">
<column name="MEM_ID" length="32" />
<generator class="uuid" />
</id>
<property name="name" type="string">
<column name="NAME" length="50" />
</property>
<property name="password" type="string">
<column name="PASSWORD" length="16" />
</property>
<property name="found" type="java.lang.Float">
<column name="FOUND" precision="126" scale="0" />
</property>
<property name="email" type="string">
<column name="EMAIL" length="50" />
</property>
<property name="sex" type="string">
<column name="SEX" length="10" />
</property>
<property name="age" type="int">
<column name="AGE" />
</property>
<property name="phone" type="string">
<column name="PHONE" />
</property>
<property name="education" type="string">
<column name="EDUCATION" length="12" />
</property>
<property name="hobby" type="string">
<column name="HOBBY" length="300" />
</property>
<set name="TCollections" table="T_COLLECTION" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="MEM_ID" length="32" not-null="true" />
</key>
<one-to-many class="com.derong.auction.model.TCollection" />
</set>
<set name="TGoodsCommons" table="T_GOODS_COMMON" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="MEM_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TGoodsCommon" />
</set>
<set name="TBidRecords" table="T_BID_RECORD" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="MEM_ID" length="32" />
</key>
<one-to-many class="com.derong.auction.model.TBidRecord" />
</set>
<set name="TEstimates" table="T_ESTIMATE" inverse="false" lazy="true" fetch="join" cascade="none">
<key>
<column name="MEM_ID" length="32" not-null="true" />
</key>
<one-to-many class="com.derong.auction.model.TEstimate" />
</set>
</class>
</hibernate-mapping>
记录:
<?xml version="1.0"?>
<!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.derong.auction.model.TBidRecord" table="T_BID_RECORD" schema="HELLO" dynamic-update="true">
<comment>ÅÄÂô¼Ç¼±í</comment>
<id name="bidRecordId" type="string">
<column name="BID_RECORD_ID" length="32" />
<generator class="uuid" />
</id>
<many-to-one name="TMember" class="com.derong.auction.model.TMember" fetch="join" cascade="none">
<column name="MEM_ID" length="32" />
</many-to-one>
<many-to-one name="TGoodsCommon" class="com.derong.auction.model.TGoodsCommon" fetch="join" cascade="none">
<column name="GOOD_ID" length="32" />
</many-to-one>
<property name="bidtime" type="string">
<column name="BIDTIME" length="20" />
</property>
<property name="bidprice" type="java.lang.Float">
<column name="BIDPRICE" precision="126" scale="0" />
</property>
</class>
</hibernate-mapping>
图片:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!-- Generated 2012-3-29 9:20:05 by Hibernate Tools 3.3.0.GA -->
<hibernate-mapping>
<class name="com.derong.auction.model.TPictrue" table="T_PICTRUE" schema="HELLO" dynamic-update="true" lazy="true">
<comment>ͼƬ±í</comment>
<id name="pictrueId" type="string">
<column name="PICTRUE_ID" length="32" />
<generator class="uuid" />
</id>
<many-to-one name="TGoodsCommon" class="com.derong.auction.model.TGoodsCommon" fetch="join" cascade="none" lazy="false">
<column name="GOOD_ID" length="32" />
</many-to-one>
<property name="directory" type="string">
<column name="DIRECTORY" length="100" not-null="true" />
</property>
</class>
</hibernate-mapping>
年龄统计:
<?xml version="1.0"?>
<!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.derong.auction.model.TAgeAmount" table="T_AGE_AMOUNT" schema="HELLO" dynamic-update="true">
<id name="goodId" type="string">
<column name="GOOD_ID" length="32" />
<generator class="foreign">
<param name="property">TGoodsCommon</param>
</generator>
</id>
<one-to-one name="TGoodsCommon" class="com.derong.auction.model.TGoodsCommon" constrained="true" cascade="none"></one-to-one>
<property name="under15" type="int">
<column name="UNDER15" />
</property>
<property name="under25" type="int">
<column name="UNDER25" />
</property>
<property name="under35" type="int">
<column name="UNDER35" />
</property>
<property name="under45" type="int">
<column name="UNDER45" />
</property>
<property name="under55" type="int">
<column name="UNDER55" />
</property>
<property name="under65" type="int">
<column name="UNDER65" />
</property>
<property name="over66" type="int">
<column name="OVER66" />
</property>
</class>
</hibernate-mapping>
书画:
<?xml version="1.0"?>
<!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.derong.auction.model.TPainting" table="T_PAINTING" schema="HELLO" dynamic-update="true">
<comment>Êé»­±í</comment>
<!-- <subselect>
select goodId , max(tbr.bidprice) myLastPrice, count(*) myBidNum from TBidRecord tbr where tbr.TMember.memId = ? group by tbr.TGoodsCommon.goodId
</subselect>
<synchronize table="TBidRecord"/> -->
<id name="goodId" type="string">
<column name="GOOD_ID" length="32" />
<generator class="foreign">
<param name="property">TGoodsCommon</param>
</generator>
</id>
<one-to-one name="TGoodsCommon" class="com.derong.auction.model.TGoodsCommon" constrained="true" cascade="none"></one-to-one>
<property name="title" type="string">
<column name="TITLE" length="100" />
</property>
<property name="author" type="string">
<column name="AUTHOR" length="50" />
</property>
<property name="years" type="string">
<column name="YEARS" length="50" />
</property>
<property name="istrue" type="string">
<column name="ISTRUE" length="10" />
</property>
<property name="intact" type="string">
<column name="INTACT" length="10" />
</property>
<property name="dimensions" type="string">
<column name="DIMENSIONS" length="50" />
</property>
<property name="material" type="string">
<column name="MATERIAL" length="300" />
</property>
<property name="authorinfo" type="text">
<column name="AUTHORINFO" />
</property>
<property name="description" type="text">
<column name="DESCRIPTION" />
</property>
</class>
</hibernate-mapping>
分享到:
相关推荐
《Xdoclet生成*.hbm.xml映射文件详解》 在Java开发中,尤其是在使用Hibernate作为持久层框架时,数据库模型与Java对象之间的映射文件*.hbm.xml是必不可少的。这种映射文件定义了数据库表与Java实体类之间的对应关系...
标题提到的"xdoclet 用于生成*.hbm.xml"表明xdoclet主要被用来自动生成Hibernate的映射文件——.hbm.xml。 Hibernate是一个流行的开源对象关系映射(ORM)框架,它允许开发者使用Java对象来操作数据库,而无需编写...
《hibernate.hbm.xml详解》 在Java的持久化框架Hibernate中,`hibernate.hbm.xml`文件是至关重要的,它定义了Java对象与数据库表之间的映射关系,使得对象模型能够与关系型数据库无缝对接。这篇文章将深入解析`...
`.hbm.xml`文件用于映射数据库表和Java类之间的关系,而`hibernate.cfg.xml`则是Hibernate的整体配置文件,包含了数据库连接、事务管理等核心设置。 ** Hibernate基础知识 ** Hibernate是一款流行的Java持久化框架...
使用 MyEclipse 工具生成 POJO 类和映射文件 .hbm.xml MyEclipse 是一款功能强大且流行的集成开发环境(IDE),它提供了许多实用的功能来帮助开发者快速开发应用程序。在本篇文章中,我们将学习如何使用 MyEclipse ...
hibernate.queries.hbm.xml这个文件需要放在jbpm*(版本).jar中。。的org.jbpm.db目录下,先删除以前的文件,然后,换上共享中这个。。大家可以用文件比较器看看,并没有改变以前的,只是新加了。。
在Hibernate中,XML配置文件是连接对象模型与数据库模型的关键,而`.hbm.xml`文件就是这种映射的载体。本文将深入探讨Hibernate的`.hbm.xml`配置文件以及其内部的映射类型。 首先,让我们了解`.hbm.xml`文件的作用...
本主题聚焦于如何在Oracle环境中自动生成Hibernate实体类(`.java`文件)及其对应的映射文件(`.hbm.xml`文件)。这个过程通常是为了减少手动编写这些文件的工作量,提高开发效率。 首先,我们需要理解`Oracle`存储...
address.hbm.xml address.hbm.xml
<value>classpath:/com/company/domain/**/maps/*.hbm.xml ``` 这将加载`com/company/domain`包下任何`maps`子路径下的所有`.hbm.xml`文件。 3. `mappingDirectoryLocations`: 这个属性用于指定映射文件所在...
Address类对应的配置文件
Hibernate 持久性访问层 *.hbm.xml(类—-表,属性–字段) 2注解 项目包 1,action 控制器 2,dao 操作数据库— 3,model 实体类模型 4,service 逻辑业务层 5,util 工具类 log4j.properties 日志文件 *.properties...
Hibernate 持久性访问层 *.hbm.xml(类—-表,属性–字段) 2注解 项目包 1,action 控制器 2,dao 操作数据库— 3,model 实体类模型 4,service 逻辑业务层 5,util 工具类 log4j.properties 日志文件 *.properties...
本文将详细解析Hibernate配置中的两个关键文件——`hibernate.cfg.xml`和`*.hbm.xml`,并探讨它们在Hibernate运行机制中的作用。 #### hibernate.cfg.xml:全局配置的核心 `hibernate.cfg.xml`文件作为Hibernate的...
3. **.hbm.xml 文件**(jbpm.execution.hbm.xml, jbpm.task.hbm.xml, jbpm.jpdl.hbm.xml, jbpm.history.hbm.xml, jbpm.wire.bindings.xml, jbpm.identity.hbm.xml, jbpm.repository.hbm.xml):这些是Hibernate映射...
首先,XML文件是Hibernate配置的重要组成部分,通常包含`hibernate.cfg.xml`和实体类的`*.hbm.xml`文件。`hibernate.cfg.xml`用于配置数据库连接、事务管理等信息,而`*.hbm.xml`文件则定义了Java对象与数据库表之间...
本文将更加深入地解析另一种重要的配置文件——`*.hbm.xml`,特别是如何通过此类文件来管理实体与数据库表之间的映射关系,以及处理复杂的关联关系,如一对一、一对多、多对一和多对多。 #### `*.hbm.xml`文件解析 ...
Hibernate 在 MyEclipse 中根据表结构生成实体和 hbm.xml 文件 在 MyEclipse 中,我们可以使用 Hibernate 根据现有的数据库表结构生成实体和 hbm.xml 配置文件,这样可以避免手动编写 JPA 或 Hibernate 实体类。...
3. ***.hbm.xml**: 这些是Hibernate的映射文件,用于定义Java类与数据库表之间的映射关系。每个.hbm.xml文件对应一个Java实体类,它详细描述了类的属性如何映射到数据库表的列,以及主键、外键等关系。例如,`User....
在Hibernate中,DTD文件主要用来定义配置文件的结构,例如`hibernate.cfg.xml`和映射文件`*.hbm.xml`。 在Hibernate的配置文件`hibernate.cfg.xml`中,DTD定义了如何设置数据库连接、SessionFactory、缓存策略等...