<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    lqxue

    常用鏈接

    統(tǒng)計

    book

    tools

    最新評論

    為什么在hibernate中用list影射one-to-many時,在查詢數(shù)據(jù)時,經(jīng)常有null值

     Learned a little this weekend - Bag vs List in Hibernate.  I was troubled since i really wanted to have a Java ArrayList in my object so i could index in my jsp and iterate over the list in an update form.  Using a Hibernate Set left me unable to index.  A Hibernate List left the Java ArrayList populated using the primary key - if the keys were 0,1,2,... that would have been ok.  But i only needed a few items from the database in my ArrayList and since the Hibernate List maintains the position of the object in the ArrayList equal to the position in the database the technique was leaving holes in my ArrayList of nulls.  Of course this was not what i wanted.  Now this may be explained in the documentation but after reading it twice i did not fully understand the Hibernate List.  Over the weekend i read the book Hibernate in Action and discovered the Hibernate Bag and it solved my problem.  I can use a Java ArrayList that is loaded simply by adding new objects to the beginning of the ArrayList.

    posted on 2007-04-05 16:50 lqx 閱讀(3071) 評論(1)  編輯  收藏

    評論

    # re: 為什么在hibernate中用list影射one-to-many時,在查詢數(shù)據(jù)時,經(jīng)常有null值 2015-06-15 18:53 游客

    哪位大神知道的,求指教!  回復  更多評論   


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


    網(wǎng)站導航:
     
    主站蜘蛛池模板: 亚洲av无码一区二区三区天堂古代| 亚洲人成精品久久久久| a毛片免费播放全部完整| 夜色阁亚洲一区二区三区| 亚洲av永久中文无码精品| 全免费a级毛片免费看无码| 亚洲一卡2卡三卡4卡无卡下载| 国产精品成人免费一区二区| 免费人成网站7777视频| 久久精品国产亚洲av品善| 久久免费高清视频| 亚洲三级电影网站| 免费在线人人电影网| 亚洲精品乱码久久久久久蜜桃| 一区二区3区免费视频| 成年女人免费视频播放体验区| 国产精品亚洲美女久久久| 亚洲一区二区三区高清| 中文字幕免费视频一| 亚洲免费在线视频播放| 99精品视频在线观看免费| 亚洲Av无码精品色午夜| 免费AA片少妇人AA片直播| 中文字幕亚洲综合久久综合 | 亚洲一区二区三区久久久久| 毛片a级毛片免费观看免下载 | 一区二区三区在线免费观看视频 | 久久激情亚洲精品无码?V| 丝袜捆绑调教视频免费区| 99久久99久久免费精品小说| 91在线视频免费观看| 亚洲日本va午夜中文字幕一区| 亚洲一区二区三区免费视频| 亚洲综合欧美色五月俺也去| 国产伦精品一区二区三区免费迷| 高清永久免费观看| 亚洲欧洲日产v特级毛片| 免费播放美女一级毛片| 亚洲精品你懂的在线观看| 污视频网站免费观看| 亚洲AV无码AV男人的天堂|