锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美一区久久,一本一道dvd在线观看免费视频 ,欧美日韩亚洲丝袜制服http://www.aygfsteel.com/rongxh7/category/40151.htmlStruts2.x+Spring2.x+Hibernate3.x+EJB3.0+JPA+Jquery+SOA+WebService+Eclipse+MySQL+Oracle+WebLogic+JBoss+.......鎺㈢儲涓庢眰鐭ワ紝瀵繪壘涓鏉″畬緹庣殑璺紝閫氳繃姊︽兂鐨勪笘鐣岋紒zh-cnSat, 20 Jun 2009 12:17:01 GMTSat, 20 Jun 2009 12:17:01 GMT60鐢ㄦ埛鎺堟潈涓庢柊闂誨彂甯冪郴緇熶腑鐨凧PA瀹炰緥http://www.aygfsteel.com/rongxh7/archive/2009/06/13/281945.html蹇冩ⅵ甯嗗獎蹇冩ⅵ甯嗗獎Fri, 12 Jun 2009 18:15:00 GMThttp://www.aygfsteel.com/rongxh7/archive/2009/06/13/281945.htmlhttp://www.aygfsteel.com/rongxh7/comments/281945.htmlhttp://www.aygfsteel.com/rongxh7/archive/2009/06/13/281945.html#Feedback4http://www.aygfsteel.com/rongxh7/comments/commentRss/281945.htmlhttp://www.aygfsteel.com/rongxh7/services/trackbacks/281945.html闃呰鍏ㄦ枃

蹇冩ⅵ甯嗗獎 2009-06-13 02:15 鍙戣〃璇勮
]]>
Hibernate(JPA)澶氬澶?ManyToMany)鍏寵仈鏄犲皠涓嶅畬緹庝箣澶?/title><link>http://www.aygfsteel.com/rongxh7/archive/2009/06/08/280637.html</link><dc:creator>蹇冩ⅵ甯嗗獎</dc:creator><author>蹇冩ⅵ甯嗗獎</author><pubDate>Mon, 08 Jun 2009 05:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/rongxh7/archive/2009/06/08/280637.html</guid><wfw:comment>http://www.aygfsteel.com/rongxh7/comments/280637.html</wfw:comment><comments>http://www.aygfsteel.com/rongxh7/archive/2009/06/08/280637.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.aygfsteel.com/rongxh7/comments/commentRss/280637.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/rongxh7/services/trackbacks/280637.html</trackback:ping><description><![CDATA[榪戞潵錛屽湪鍋氱殑涓涓狽ewsMS欏圭洰涓紝闇瑕佺敤鍒板瀵瑰鍏寵仈鏄犲皠錛屼互涓嬫槸欏圭洰涓敤鍒扮殑涓や釜瀹炰綋綾伙細鐢ㄦ埛綾籙ser鍜岃鑹茬被Role錛屽畠浠箣闂存槸澶氬澶氱殑鍏崇郴銆?br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #008000">//</span><span style="color: #008000">鐢ㄦ埛琛?/span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">@Entity<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />@Table(name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">rong_user</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_74_489_Open_Image" onclick="this.style.display='none'; Codehighlighter1_74_489_Open_Text.style.display='none'; Codehighlighter1_74_489_Closed_Image.style.display='inline'; Codehighlighter1_74_489_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_74_489_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_74_489_Closed_Text.style.display='none'; Codehighlighter1_74_489_Open_Image.style.display='inline'; Codehighlighter1_74_489_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> User</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_74_489_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_74_489_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">鐪佺暐鍏跺畠鍐呭</span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> Set</span><span style="color: #000000"><</span><span style="color: #000000">Role</span><span style="color: #000000">></span><span style="color: #000000"> roles </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> LinkedHashSet</span><span style="color: #000000"><</span><span style="color: #000000">Role</span><span style="color: #000000">></span><span style="color: #000000">();    </span><span style="color: #008000">//</span><span style="color: #008000">瑙掕壊闆嗗悎</span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000">    <br /> <img id="Codehighlighter1_174_213_Open_Image" onclick="this.style.display='none'; Codehighlighter1_174_213_Open_Text.style.display='none'; Codehighlighter1_174_213_Closed_Image.style.display='inline'; Codehighlighter1_174_213_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_174_213_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_174_213_Closed_Text.style.display='none'; Codehighlighter1_174_213_Open_Image.style.display='inline'; Codehighlighter1_174_213_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    @ManyToMany(cascade </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_174_213_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_174_213_Open_Text"><span style="color: #000000">{CascadeType.PERSIST, CascadeType.MERGE}</span></span><span style="color: #000000">)<br /> <img id="Codehighlighter1_267_298_Open_Image" onclick="this.style.display='none'; Codehighlighter1_267_298_Open_Text.style.display='none'; Codehighlighter1_267_298_Closed_Image.style.display='inline'; Codehighlighter1_267_298_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_267_298_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_267_298_Closed_Text.style.display='none'; Codehighlighter1_267_298_Open_Image.style.display='inline'; Codehighlighter1_267_298_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    @JoinTable(name </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">rong_user_role</span><span style="color: #000000">"</span><span style="color: #000000">, joinColumns </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_267_298_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_267_298_Open_Text"><span style="color: #000000">{ @JoinColumn(name </span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">user_id</span><span style="color: #000000">"</span><span style="color: #000000"> )}</span></span><span style="color: #000000">, inverseJoinColumns </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_322_354_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_322_354_Open_Text"><span style="color: #000000">{ @JoinColumn(name </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">role_id</span><span style="color: #000000">"</span><span style="color: #000000">) }</span></span><span style="color: #000000">)<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    @OrderBy(</span><span style="color: #000000">"</span><span style="color: #000000">id</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_402_421_Open_Image" onclick="this.style.display='none'; Codehighlighter1_402_421_Open_Text.style.display='none'; Codehighlighter1_402_421_Closed_Image.style.display='inline'; Codehighlighter1_402_421_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_402_421_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_402_421_Closed_Text.style.display='none'; Codehighlighter1_402_421_Open_Image.style.display='inline'; Codehighlighter1_402_421_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> Set</span><span style="color: #000000"><</span><span style="color: #000000">Role</span><span style="color: #000000">></span><span style="color: #000000"> getRoles() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_402_421_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_402_421_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> roles;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_462_487_Open_Image" onclick="this.style.display='none'; Codehighlighter1_462_487_Open_Text.style.display='none'; Codehighlighter1_462_487_Closed_Image.style.display='inline'; Codehighlighter1_462_487_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_462_487_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_462_487_Closed_Text.style.display='none'; Codehighlighter1_462_487_Open_Image.style.display='inline'; Codehighlighter1_462_487_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setRoles(Set</span><span style="color: #000000"><</span><span style="color: #000000">Role</span><span style="color: #000000">></span><span style="color: #000000"> roles) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_462_487_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_462_487_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.roles </span><span style="color: #000000">=</span><span style="color: #000000"> roles;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span></div> <br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #008000">//</span><span style="color: #008000">瑙掕壊琛?/span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">@Entity<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />@Table(name</span><span style="color: #000000">=</span><span style="color: #000000">"</span><span style="color: #000000">rong_role</span><span style="color: #000000">"</span><span style="color: #000000">)<br /> <img id="Codehighlighter1_56_352_Open_Image" onclick="this.style.display='none'; Codehighlighter1_56_352_Open_Text.style.display='none'; Codehighlighter1_56_352_Closed_Image.style.display='inline'; Codehighlighter1_56_352_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_56_352_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_56_352_Closed_Text.style.display='none'; Codehighlighter1_56_352_Open_Image.style.display='inline'; Codehighlighter1_56_352_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" /></span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">class</span><span style="color: #000000"> Role</span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_56_352_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_56_352_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    <br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #008000">//</span><span style="color: #008000">鐪佺暐鍏跺畠鍐呭</span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />    </span><span style="color: #0000ff">private</span><span style="color: #000000"> Set</span><span style="color: #000000"><</span><span style="color: #000000">User</span><span style="color: #000000">></span><span style="color: #000000"> user </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #0000ff">new</span><span style="color: #000000"> LinkedHashSet</span><span style="color: #000000"><</span><span style="color: #000000">User</span><span style="color: #000000">></span><span style="color: #000000">();        </span><span style="color: #008000">//</span><span style="color: #008000">鐢ㄦ埛闆嗗悎</span><span style="color: #008000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img id="Codehighlighter1_156_195_Open_Image" onclick="this.style.display='none'; Codehighlighter1_156_195_Open_Text.style.display='none'; Codehighlighter1_156_195_Closed_Image.style.display='inline'; Codehighlighter1_156_195_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_156_195_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_156_195_Closed_Text.style.display='none'; Codehighlighter1_156_195_Open_Image.style.display='inline'; Codehighlighter1_156_195_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    @ManyToMany(cascade </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_156_195_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_156_195_Open_Text"><span style="color: #000000">{CascadeType.PERSIST, CascadeType.MERGE}</span></span><span style="color: #000000">, mappedBy </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">roles</span><span style="color: #000000">"</span><span style="color: #000000">, fetch </span><span style="color: #000000">=</span><span style="color: #000000"> FetchType.LAZY)<br /> <img id="Codehighlighter1_270_288_Open_Image" onclick="this.style.display='none'; Codehighlighter1_270_288_Open_Text.style.display='none'; Codehighlighter1_270_288_Closed_Image.style.display='inline'; Codehighlighter1_270_288_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_270_288_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_270_288_Closed_Text.style.display='none'; Codehighlighter1_270_288_Open_Image.style.display='inline'; Codehighlighter1_270_288_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> Set</span><span style="color: #000000"><</span><span style="color: #000000">User</span><span style="color: #000000">></span><span style="color: #000000"> getUser() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_270_288_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_270_288_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> user;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img id="Codehighlighter1_327_350_Open_Image" onclick="this.style.display='none'; Codehighlighter1_327_350_Open_Text.style.display='none'; Codehighlighter1_327_350_Closed_Image.style.display='inline'; Codehighlighter1_327_350_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_327_350_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_327_350_Closed_Text.style.display='none'; Codehighlighter1_327_350_Open_Image.style.display='inline'; Codehighlighter1_327_350_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedSubBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> </span><span style="color: #0000ff">void</span><span style="color: #000000"> setUser(Set</span><span style="color: #000000"><</span><span style="color: #000000">User</span><span style="color: #000000">></span><span style="color: #000000"> user) </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_327_350_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_327_350_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">this</span><span style="color: #000000">.user </span><span style="color: #000000">=</span><span style="color: #000000"> user;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span></div> <br />          榪欎袱涓敓鎴愭暟鎹簱涓殑涓変釜琛紝鍒嗗埆鏄痳ong_user, rong_role鍜屼竴涓腑闂磋〃rong_user_role銆?br />          Hibernate鍜孞PA鎺у埗鍏寵仈鍏崇郴鐨勶紝鍙兘鏄竴鏂癸紝涓嶈兘鍙屾柟鎺у埗鐨勶紝涓婇潰鐨勭▼搴忎腑錛屾垜閫氳繃鍦≧ole綾諱腑璁劇疆mappedBy="roles"鏉ヨ緗敱User鏉ユ帶鍒跺叧緋伙紝<br />          榪欐牱錛岄棶棰樺氨鍑虹幇浜嗭細褰撴垜鍦ㄨ鍒犻櫎瑙掕壊Role鏃訛紝濡傛灉娌℃湁鐢ㄦ埛鎷ユ湁榪欎釜瑙掕壊鐨勮瘽錛屽氨鑳芥垚鍔熷垹闄わ紱濡傛灉鏈夌敤鎴鋒嫢鏈夎繖涓鑹茬殑鏃跺欙紝灝變笉鑳藉垹闄わ紝浼氭姏浠ヤ笅寮傚父錛?br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">12</span><span style="color: #000000">:</span><span style="color: #000000">53</span><span style="color: #000000">:</span><span style="color: #000000">33</span><span style="color: #000000">,</span><span style="color: #000000">125</span><span style="color: #000000">  WARN JDBCExceptionReporter:</span><span style="color: #000000">100</span><span style="color: #000000"> - SQL Error: </span><span style="color: #000000">1451</span><span style="color: #000000">,</span><span style="color: #000000"> SQLState: </span><span style="color: #000000">23000</span><span style="color: #000000"><br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">12</span><span style="color: #000000">:</span><span style="color: #000000">53</span><span style="color: #000000">:</span><span style="color: #000000">33</span><span style="color: #000000">,</span><span style="color: #000000">125</span><span style="color: #000000"> ERROR JDBCExceptionReporter:</span><span style="color: #000000">101</span><span style="color: #000000"> - Cannot delete or update a parent row: a foreign key constraint fails (`newsms/rong_user_role`</span><span style="color: #000000">,</span><span style="color: #000000"> CONSTRAINT `FKF1698421A337A5FA` FOREIGN KEY (`role_id`) REFERENCES `rong_role` (`id`))<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">12</span><span style="color: #000000">:</span><span style="color: #000000">53</span><span style="color: #000000">:</span><span style="color: #000000">33</span><span style="color: #000000">,</span><span style="color: #000000">171</span><span style="color: #000000"> ERROR AbstractFlushingEventListener:</span><span style="color: #000000">324</span><span style="color: #000000"> - Could not synchronize database state with session<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />/****鍫嗘爤淇℃伅鐣?***/<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /></span></div> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" /><span style="color: #000000">Caused by: java.sql.BatchUpdateException: Cannot delete or update a parent row: a foreign key constraint fails (`newsms/rong_user_role`</span><span style="color: #000000">,</span><span style="color: #000000"> CONSTRAINT `FKF1698421A337A5FA` FOREIGN KEY (`role_id`) REFERENCES `rong_role` (`id`))<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/None.gif" alt="" />/******鍫嗘爤淇℃伅鐣?****/</span></div> <br />       褰撴垜璁劇疆鎴愬崟鍚戝叧緋繪槧灝勬椂錛屽嵆鎶奟ole綾諱腑錛孲et<User>淇℃伅鍘繪帀錛岃繖鏍鳳紝涔熶笉鑳藉垹錛屽師鍥犱篃鏄鏈夊閿害鏉燂紒鎬庝箞鍔烇紵<br />       鑻︽伡浜嗗ソ鍑犲ぉ錛屾渶鍚庯紝鍙兘褰掍簬Hibernate(JPA)鐨勫瀵瑰鍏寵仈鏄犲皠璁捐寰楁湁鐐逛笉絎﹀疄闄咃紒灝卞儚涓婇潰鎴戣鐨勪緥瀛愶紝鏈変漢閫変簡鏌愯鑹詫紝灝變笉鑳藉垹鎺夎瑙掕壊銆傝繕鏈変竴縐嶅仛娉曟槸錛屽湪Role綾諱腑:<br /> <div style="border-bottom: #cccccc 1px solid; border-left: #cccccc 1px solid; padding-bottom: 4px; background-color: #eeeeee; padding-left: 4px; width: 98%; padding-right: 5px; font-size: 13px; word-break: break-all; border-top: #cccccc 1px solid; border-right: #cccccc 1px solid; padding-top: 4px"><img id="Codehighlighter1_22_80_Open_Image" onclick="this.style.display='none'; Codehighlighter1_22_80_Open_Text.style.display='none'; Codehighlighter1_22_80_Closed_Image.style.display='inline'; Codehighlighter1_22_80_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_22_80_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_22_80_Closed_Text.style.display='none'; Codehighlighter1_22_80_Open_Image.style.display='inline'; Codehighlighter1_22_80_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" /><span style="color: #000000">@ManyToMany(cascade </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_22_80_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_22_80_Open_Text"><span style="color: #000000">{CascadeType.PERSIST, CascadeType.MERGE,CascadeType.REMOVE}</span></span><span style="color: #000000">, mappedBy </span><span style="color: #000000">=</span><span style="color: #000000"> </span><span style="color: #000000">"</span><span style="color: #000000">roles</span><span style="color: #000000">"</span><span style="color: #000000">, fetch </span><span style="color: #000000">=</span><span style="color: #000000"> FetchType.LAZY)<br /> <img id="Codehighlighter1_155_173_Open_Image" onclick="this.style.display='none'; Codehighlighter1_155_173_Open_Text.style.display='none'; Codehighlighter1_155_173_Closed_Image.style.display='inline'; Codehighlighter1_155_173_Closed_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockStart.gif" alt="" /><img style="display: none" id="Codehighlighter1_155_173_Closed_Image" onclick="this.style.display='none'; Codehighlighter1_155_173_Closed_Text.style.display='none'; Codehighlighter1_155_173_Open_Image.style.display='inline'; Codehighlighter1_155_173_Open_Text.style.display='inline';" align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ContractedBlock.gif" alt="" />    </span><span style="color: #0000ff">public</span><span style="color: #000000"> Set</span><span style="color: #000000"><</span><span style="color: #000000">User</span><span style="color: #000000">></span><span style="color: #000000"> getUser() </span><span style="border-bottom: #808080 1px solid; border-left: #808080 1px solid; background-color: #ffffff; display: none; border-top: #808080 1px solid; border-right: #808080 1px solid" id="Codehighlighter1_155_173_Closed_Text"><img src="http://www.aygfsteel.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_155_173_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/InBlock.gif" alt="" />        </span><span style="color: #0000ff">return</span><span style="color: #000000"> user;<br /> <img align="top" src="http://www.aygfsteel.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />    }</span></span></div>         鍗沖姞澶氫竴涓?#8220;CascadeType.REMOVE”錛岃繖鏍瘋兘鎶婅鑹睷ole緇欏垹鎺変簡錛屼絾榪炴嫢鏈夎瑙掕壊鐨勬墍鏈夌敤鎴稶ser涔熻綰ц仈鍒犳帀浜嗐傝繖鏍鋒潵鐪嬶紝鏌愪釜鐢ㄦ埛鎷ユ湁璁稿瑙掕壊錛屽氨鍥犱負鍏朵腑鏈夎繖涓涓鑹詫紝灝辮綰ц仈鍒犱簡鏁翠釜鑷繁錛岄偅涓嶆槸寰堝啢鏋夈傝繖涔熶笉絎﹀悎瀹為檯錛?br />         涓漢璁や負錛孒ibernate(JPA)鍦ㄨ緗瀵瑰鍏寵仈鏄犲皠鏃訛紝搴旇鏈夊仛娉曡兘浣垮緱鍙屾柟閮借兘鎺у埗鍏寵仈鍏崇郴鎵嶅ソ錛屾墠絎﹀悎瀹為檯鍚э紒浣嗕簨瀹炰笂錛屽ソ鍍忚繕娌℃湁鍙戠幇鏈塇ibernate(JPA)榪欑鑳藉姏錛?br /> <img src ="http://www.aygfsteel.com/rongxh7/aggbug/280637.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/rongxh7/" target="_blank">蹇冩ⅵ甯嗗獎</a> 2009-06-08 13:33 <a href="http://www.aygfsteel.com/rongxh7/archive/2009/06/08/280637.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> 主站蜘蛛池模板: <a href="http://" target="_blank">济宁市</a>| <a href="http://" target="_blank">海宁市</a>| <a href="http://" target="_blank">濮阳市</a>| <a href="http://" target="_blank">文安县</a>| <a href="http://" target="_blank">商河县</a>| <a href="http://" target="_blank">商城县</a>| <a href="http://" target="_blank">岳西县</a>| <a href="http://" target="_blank">定襄县</a>| <a href="http://" target="_blank">临泽县</a>| <a href="http://" target="_blank">东港市</a>| <a href="http://" target="_blank">徐闻县</a>| <a href="http://" target="_blank">拉萨市</a>| <a href="http://" target="_blank">东乌珠穆沁旗</a>| <a href="http://" target="_blank">平潭县</a>| <a href="http://" target="_blank">海丰县</a>| <a href="http://" target="_blank">红原县</a>| <a href="http://" target="_blank">定结县</a>| <a href="http://" target="_blank">安多县</a>| <a href="http://" target="_blank">齐齐哈尔市</a>| <a href="http://" target="_blank">巫溪县</a>| <a href="http://" target="_blank">开江县</a>| <a href="http://" target="_blank">海口市</a>| <a href="http://" target="_blank">望谟县</a>| <a href="http://" target="_blank">峨边</a>| <a href="http://" target="_blank">手游</a>| <a href="http://" target="_blank">筠连县</a>| <a href="http://" target="_blank">习水县</a>| <a href="http://" target="_blank">南丰县</a>| <a href="http://" target="_blank">霍林郭勒市</a>| <a href="http://" target="_blank">大同市</a>| <a href="http://" target="_blank">泾川县</a>| <a href="http://" target="_blank">赤壁市</a>| <a href="http://" target="_blank">江山市</a>| <a href="http://" target="_blank">册亨县</a>| <a href="http://" target="_blank">乌拉特中旗</a>| <a href="http://" target="_blank">彰化县</a>| <a href="http://" target="_blank">长顺县</a>| <a href="http://" target="_blank">彭水</a>| <a href="http://" target="_blank">章丘市</a>| <a href="http://" target="_blank">玉田县</a>| <a href="http://" target="_blank">镇巴县</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>