哪位熟悉hibernate的sql的高手,请教一个问题。
kalxh 2008-10-23 09:58:01 我的项目是用hibernate作持久层框架,在业务中写了一个sql语句:select report1,report2,dtofrom DSRReport report1,DSRReport report2,DSRToDSR dto where report1.id=dto.DSRReportid1 and report2.id=dto.DSRReportid2.sql的意思是有两张表DSRReport 和 DSRToDSR 两张表,而DSRReport每两张记录都会在DSRToDSR表有一对一的关联,故report1和report2是属于同一张表的两个对象,然后我把它放hibernate中执行发现出错了,如果只是出现report1或report2其中一个,就是没有错误。它出现的错误信息如下:
org.springframework.orm.hibernate3.HibernateQueryException: DSRReport is not mapped
请哪位高人大侠指点指点!急,在线等。