<hibernate-mapping >
<class name="com.joyoung.emkt.model.SaleAreaStruts" table="tableview" catalog="business">
<id name="id" type="java.lang.String">
<column name="dpgid" length="32" />
<generator class="uuid.hex"></generator>
</id>
<component name="bigArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="baid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="baname" length="50" not-null="true" />
</property>
</component>
<component name="priArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="aid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="aname" length="50" not-null="true" />
</property>
</component>
<component name="cityArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="cid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="cname" length="50" not-null="true" />
</property>
</component>
</class>
</hibernate-mapping>saleAreaStruts.bigArea.id如上,SaleAreaStruts对应一个数据库表tableview,bigArea是saleAreaStruts的component。我想给组建bigArea的id字段赋值后做查询,如
criteria.add(Restrictions.eq("applyInfomation.saleAreaStruts.bigArea.id",id));但是报错如下:2009-08-20 09:57:59,125 http-8888-2 [ERROR]:org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: saleAreaStruts.bigArea.id of: com.joyoung.emkt.model.ApplyInfomation; nested exception is org.hibernate.QueryException: could not resolve property: saleAreaStruts.bigArea.id of: com.joyoung.emkt.model.ApplyInfomation
<class name="com.joyoung.emkt.model.SaleAreaStruts" table="tableview" catalog="business">
<id name="id" type="java.lang.String">
<column name="dpgid" length="32" />
<generator class="uuid.hex"></generator>
</id>
<component name="bigArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="baid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="baname" length="50" not-null="true" />
</property>
</component>
<component name="priArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="aid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="aname" length="50" not-null="true" />
</property>
</component>
<component name="cityArea" class="com.joyoung.software.emkt.pojo.SysSellArea">
<property name="id" type="java.lang.String">
<column name="cid" length="32" not-null="true" />
</property>
<property name="name" type="java.lang.String">
<column name="cname" length="50" not-null="true" />
</property>
</component>
</class>
</hibernate-mapping>saleAreaStruts.bigArea.id如上,SaleAreaStruts对应一个数据库表tableview,bigArea是saleAreaStruts的component。我想给组建bigArea的id字段赋值后做查询,如
criteria.add(Restrictions.eq("applyInfomation.saleAreaStruts.bigArea.id",id));但是报错如下:2009-08-20 09:57:59,125 http-8888-2 [ERROR]:org.springframework.orm.hibernate3.HibernateQueryException: could not resolve property: saleAreaStruts.bigArea.id of: com.joyoung.emkt.model.ApplyInfomation; nested exception is org.hibernate.QueryException: could not resolve property: saleAreaStruts.bigArea.id of: com.joyoung.emkt.model.ApplyInfomation
解决方案 »
- java工程里面加个超链接,怎么让他直接跳转到想要的页面
- SqlMapClient 实例闲置一段时间中再用,为什么老是不响应?
- 用户axis和xfire以及CXF三种方式实现Web Services分别有什么优缺点?
- 登录验证的问题
- 问一下,我装的是tomcat,为什么每次电脑重新启动后,第一次访问jsp,速度很慢,然后就快了。
- 急!!请高手给小弟指点迷经!在线等!
- out写入页面的ajax返回值调试时候,返回值多出<pre>标签,灰常费解,求解答
- Hibernate+spring+struct ActionSupport 类不能用了 为什么?
- 序列化的问题!!
- 做了一个搜索信息的网站,大家帮忙看看,提提意见
- 问一个关于struts中关于action验证validation的问题!
- 怎样才能在工程启动时从数据库加载一些基本信息
检查下映射文件和POJO类,看看这个ID是否配置正确
我试过了,报错信息列出来了,请看好题再回答