hibernate 调用 存储过程 问题
hibernate映射
<?xml version="1.0" encoding="utf-8"?>
<!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 Persistence Tools
-->
<hibernate-mapping>
<class name="com.sxyh.entity.TRoom" table="t_Room" schema="dbo" catalog="PrisonSecurity">
<id name="finterId" type="java.lang.Integer">
<column name="FInterID" />
<generator class="native" />
</id>
<property name="fnumber" type="java.lang.String">
<column name="FNumber" length="50" not-null="true" />
</property>
<property name="fname" type="java.lang.String">
<column name="FName" length="50" not-null="true" />
</property>
<property name="fnote" type="java.lang.String">
<column name="FNote" />
</property>
<set name="TDevices" inverse="true" lazy="false">
<key>
<column name="FRoomID" not-null="true" />
</key>
<one-to-many class="com.sxyh.entity.TDevice" />
</set>
</class>
<sql-query name="proc" callable="true">
<return alias="Room" class="com.sxyh.entity.TRoom">
<return-property name="FInterID" column="FInterID" />
<return-property name="FNumber" column="FNumber" />
<return-property name="FName" column="FName" />
</return>
{call proc()}
</sql-query>
</hibernate-mapping>
执行方法
Session session =HibernateSessionFactory.getSession();
// SQLQuery query = session.createSQLQuery("{Call proc()}");
Query query = session.getNamedQuery("proc");
List list =query.list();
System.out.println("s=========="+list.size());
session.close();
结果关键字 'proc' 附近有语法错误。哪一步错了哪位大哥说下