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 閱讀(336) 評論(0)  編輯  收藏


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


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

          導航

          統計

          常用鏈接

          留言簿(3)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 东乡族自治县| 巫溪县| 南川市| 开平市| 哈巴河县| 仁布县| 错那县| 宁德市| 永德县| 四平市| 德江县| 昭通市| 乐陵市| 石柱| 保德县| 揭阳市| 台北县| 沈阳市| 章丘市| 蒲江县| 新津县| 辰溪县| 大理市| 工布江达县| 多伦县| 杭州市| 延吉市| 白沙| 衡阳市| 通山县| 新昌县| 道真| 博兴县| 定日县| 林甸县| 紫阳县| 土默特左旗| 安仁县| 平谷区| 玉环县| 苍南县|