首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > XML SOAP >

hibernate里头的sqlpuls.hbm.xml

2012-09-09 
hibernate里面的sqlpuls.hbm.xml有的时候,我们有用Sql语句查询,查出来的数据,可以用??sql-query namege

hibernate里面的sqlpuls.hbm.xml

有的时候,我们有用Sql语句查询,查出来的数据,可以用??<sql-query name="getMenubyStoreIDanddeptid" >
?<return alias="menu" column="id"/>
??<return-property name="name" column="name"/>
??<return-property name="price" column="price"/>
?</return>
?<![CDATA[
?select m.id,g.name,g.price from menu m inner join menuprice g on g.systemid=m.systemid where g.menuserial=(select s.templastmenuserial from store as s where s.id=?) and g.itemdept=?
?]]>
?</sql-query>
这样一个东西,可以用一个对象来取值。

热点排行