您好, 欢迎来到 !    登录 | 注册 | | 设为首页 | 收藏本站

我可以使用休眠条件调用存储过程吗?

我可以使用休眠条件调用存储过程吗?

请参阅参考文档中的使用存储过程进行查询

映射的查询这样来称呼。

List employment = sess.getNamedQuery("BigSP")
    .list();

映射查询可以返回实体。

<sql-query name="BigSP" callable="true">
    <return alias="emp" class="Employment">
        <return-property name="employee" column="EMPLOYEE"/>
        <return-property name="employer" column="EMPLOYER"/>
        <return-property name="startDate" column="STARTDATE"/>
        <return-property name="endDate" column="ENDDATE"/>
        <return-property name="regionCode" column="REGIONCODE"/>
        <return-property name="id" column="EID"/>
        <return-property name="salary">
            <return-column name="VALUE"/>
            <return-column name="CURRENCY"/>
        </return-property>
    </return>
    { call BigSP }
</sql-query>
其他 2022/1/1 18:14:21 有634人围观

撰写回答


你尚未登录,登录后可以

和开发者交流问题的细节

关注并接收问题和回答的更新提醒

参与内容的编辑和改进,让解决方法与时俱进

请先登录

推荐问题


联系我
置顶