<mapping resource="com/bizengine/km/entity/Articleview1.hbm.xml"></mapping>
这是hibernate.cfg.xml关于这个视图的一句
以下是Articleview1.hbm.xml文件
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name="com.bizengine.km.entity.Articleview1" table="ARTICLEVIEW1" schema="SCOTT">
<composite-id name="id" class="com.bizengine.km.entity.Articleview1Id">
<key-property name="articleid" type="long">
<column name="ARTICLEID" precision="22" scale="0" />
</key-property>
<key-property name="catalogid" type="long">
<column name="CATALOGID" precision="22" scale="0" />
</key-property>
<key-property name="articlename" type="string">
<column name="ARTICLENAME" length="100" />
</key-property>
<key-property name="author" type="string">
<column name="AUTHOR" length="10" />
</key-property>
<key-property name="employeeid" type="string">
<column name="EMPLOYEEID" length="10" />
</key-property>
<key-property name="createtime" type="timestamp">
<column name="CREATETIME" length="7" />
</key-property>
<key-property name="replyid" type="long">
<column name="REPLYID" precision="22" scale="0" />
</key-property>
<key-property name="content" type="string">
<column name="CONTENT" length="100" />
</key-property>
<key-property name="re" type="string">
<column name="REMARK" length="100" />
</key-property>
<key-property name="topsort" type="long">
<column name="TOPSORT" precision="22" scale="0" />
</key-property>
<key-property name="articletype" type="long">
<column name="ARTICLETYPE" precision="22" scale="0" />
</key-property>
<key-property name="clickamount" type="long">
<column name="CLICKAMOUNT" precision="22" scale="0" />
</key-property>
<key-property name="replyamount" type="long">
<column name="REPLYAMOUNT" precision="22" scale="0" />
</key-property>
<key-property name="replydatetime" type="timestamp">
<column name="REPLYDATETIME" length="7" />
</key-property>
<key-property name="replyusername" type="string">
<column name="REPLYUSERNAME" length="10" />
</key-property>
</composite-id>
</class>
</hibernate-mapping>
这是hibernate.cfg.xml关于这个视图的一句
以下是Articleview1.hbm.xml文件
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<!--
Mapping file autogenerated by MyEclipse - Hibernate Tools
-->
<hibernate-mapping>
<class name="com.bizengine.km.entity.Articleview1" table="ARTICLEVIEW1" schema="SCOTT">
<composite-id name="id" class="com.bizengine.km.entity.Articleview1Id">
<key-property name="articleid" type="long">
<column name="ARTICLEID" precision="22" scale="0" />
</key-property>
<key-property name="catalogid" type="long">
<column name="CATALOGID" precision="22" scale="0" />
</key-property>
<key-property name="articlename" type="string">
<column name="ARTICLENAME" length="100" />
</key-property>
<key-property name="author" type="string">
<column name="AUTHOR" length="10" />
</key-property>
<key-property name="employeeid" type="string">
<column name="EMPLOYEEID" length="10" />
</key-property>
<key-property name="createtime" type="timestamp">
<column name="CREATETIME" length="7" />
</key-property>
<key-property name="replyid" type="long">
<column name="REPLYID" precision="22" scale="0" />
</key-property>
<key-property name="content" type="string">
<column name="CONTENT" length="100" />
</key-property>
<key-property name="re" type="string">
<column name="REMARK" length="100" />
</key-property>
<key-property name="topsort" type="long">
<column name="TOPSORT" precision="22" scale="0" />
</key-property>
<key-property name="articletype" type="long">
<column name="ARTICLETYPE" precision="22" scale="0" />
</key-property>
<key-property name="clickamount" type="long">
<column name="CLICKAMOUNT" precision="22" scale="0" />
</key-property>
<key-property name="replyamount" type="long">
<column name="REPLYAMOUNT" precision="22" scale="0" />
</key-property>
<key-property name="replydatetime" type="timestamp">
<column name="REPLYDATETIME" length="7" />
</key-property>
<key-property name="replyusername" type="string">
<column name="REPLYUSERNAME" length="10" />
</key-property>
</composite-id>
</class>
</hibernate-mapping>
解决方案 »
- hibernate如何用annotation设置树形结构
- 奇怪servlet-api错误
- 用 struts <html:iterate> 显示数组里面的数组
- spring 在web 环境下如何加载bean
- xml企业间数据交换
- 如何给dao配置事务
- oracle.jdbc2.Blob这个包哪里下载,能不能提供一下下载的网址?
- 在线等!!!!出现这种错误我该怎么办!说实话,我对TOMCAT一点也不熟悉,公司网站现在访问主页就成这个样子,公司只有我一个新来的,我
- 为什么没有borland Enterprise Server5.0?
- 控制台读取输入流,读到2个空行则停止该怎么实现
- 火腿~~
- 讨论web service、soa和bpel
通过Query qu = session.createQuery("from Articleview1 art");
System.out.println(qu.list().get(0));
打印出是 null
Criteria ctt = session.createCriteria(Articleview1.class);
ArrayList results = (ArrayList) ctt.list();
得到结果也是[]空然后在这里会报错..
但现在在ECLIPSE里的datebase explorer里对这个视图进行查询没有问题...
视图在数据库内也没有部问题...