Cat.hbm.xml的文件内容为:
<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-mapping package="com.icss.sieaf.test">
<class name="Cat" table="CAT">
<!-- A 32 hex character is our surrogate key. It's automatically
generated by Hibernate with the UUID pattern. -->
<id name="id" type="string" unsaved-value="null" >
<column name="CAT_ID" sql-type="varchar(20)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<!-- A cat has to have a name, but it shouldn' be too long. -->
<property name="name">
<column name="NAME" sql-type="varchar(20)" not-null="true"/>
</property>
<property name="sex"/>
<property name="weight"/>
</class>
</hibernate-mapping>
<?xml version="1.0"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"><hibernate-mapping package="com.icss.sieaf.test">
<class name="Cat" table="CAT">
<!-- A 32 hex character is our surrogate key. It's automatically
generated by Hibernate with the UUID pattern. -->
<id name="id" type="string" unsaved-value="null" >
<column name="CAT_ID" sql-type="varchar(20)" not-null="true"/>
<generator class="uuid.hex"/>
</id>
<!-- A cat has to have a name, but it shouldn' be too long. -->
<property name="name">
<column name="NAME" sql-type="varchar(20)" not-null="true"/>
</property>
<property name="sex"/>
<property name="weight"/>
</class>
</hibernate-mapping>
解决方案 »
- web项目!求分析这样接口写是否合理。求正确思路
- 请问30次左右的ResultSet开关会不会很蛋疼?
- 探讨写入excel数据的问题
- 启动Tomcat出现异常
- 请教eclipse新建工程出错!!!!错误提示:NewProjectCreationWizard.op_error.message
- hibernate3个表多对多关联的问题
- 大家好,请教一个关于版本升级的问题!
- jboss发布ejb报错求援助
- 求大家帮帮忙!!!
- 关于tomcat下面数据连接池的问题!请执教!~再线等待
- 巨奇怪的tomcat于ie结合问题,不知道以前有没有人遇到过
- 急!如何在java中执行一个有返回值的Sql Server 2000存储过程?
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
是什么意思呢?