Hibernate query

          1. session.createSqlQuery(), in purpose to increase performance, execute sql directly. addScalar() method is used to sepcify type of columns, add entity to return certain entity instance.
          2. session.getNamedQuery(), execute query defined in mapping files with <sql-query> element, the query can be a defined sql sentence or a procedure, property type and entity type can also be specifid by certain elment.
          3. update, detelet, insert sql can be defined in xml mapping files also.


          The finaly purpose of the query is to enchance performance.

          posted on 2007-05-24 12:51 Sheldon Sun 閱讀(334) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          <2007年5月>
          293012345
          6789101112
          13141516171819
          20212223242526
          272829303112
          3456789

          導航

          統計

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 永康市| 轮台县| 平谷区| 会昌县| 板桥市| 安泽县| 卢氏县| 恩施市| 巧家县| 叙永县| 武城县| 曲阜市| 长寿区| 惠来县| 安徽省| 阿勒泰市| 通城县| 中山市| 城市| 两当县| 漳州市| 尖扎县| 郯城县| 恭城| 斗六市| 淮南市| 镇平县| 宣威市| 丰原市| 孝义市| 乌审旗| 甘南县| 金塔县| 江口县| 宁南县| 五华县| 渑池县| 高密市| 宜春市| 乌鲁木齐市| 鹤岗市|