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)

          隨筆檔案

          文章檔案

          搜索

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 东兰县| 柳州市| 临邑县| 通渭县| 威宁| 九寨沟县| 广东省| 南雄市| 南溪县| 金寨县| 华容县| 四川省| 科技| 樟树市| 钦州市| 攀枝花市| 远安县| 西青区| 图木舒克市| 奉节县| 普安县| 青州市| 鹤岗市| 通道| 正阳县| 女性| 惠水县| 罗源县| 焉耆| 益阳市| 广平县| 廉江市| 称多县| 灌云县| 拉孜县| 疏勒县| 肥乡县| 乌审旗| 奉贤区| 天水市| 武胜县|