<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麻豆| 亚洲色图.com| 黄网站在线播放视频免费观看| A级毛片高清免费视频在线播放| 国产卡二卡三卡四卡免费网址| va亚洲va日韩不卡在线观看| 亚洲欧洲国产精品久久| 久久WWW免费人成一看片| 综合亚洲伊人午夜网| 亚洲中文字幕久久精品无码A| 日韩免费一区二区三区在线| 亚洲午夜福利在线观看| 中文字幕在线免费播放| 成年女人毛片免费播放视频m| 国产aⅴ无码专区亚洲av| 黄页视频在线观看免费| 天堂亚洲免费视频| 中文字幕在线视频免费| 亚洲AV无码一区二区乱子伦| 一级做a爱过程免费视频高清| 好吊妞在线成人免费| 久久精品国产亚洲AV电影| 亚洲视频在线免费| 国产免费直播在线观看视频| 亚洲va在线va天堂va手机| 成人无码WWW免费视频| 亚洲激情视频在线观看| 中国内地毛片免费高清| 麻豆亚洲AV永久无码精品久久| 100000免费啪啪18免进| 亚洲成人福利网站| 夫妻免费无码V看片| 国产精品免费αv视频| 亚洲系列中文字幕| 在线观看免费av网站| 久久精品国产亚洲av麻豆色欲 | 亚洲日韩中文在线精品第一 | 免费人成在线视频| 亚洲一区二区三区在线观看蜜桃|