锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲人妻av伦理,免费亚洲视频在线观看,亚洲A∨无码一区二区三区http://www.tkk7.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.tkk7.com/rongxh7/archive/2009/06/13/281945.html蹇冩ⅵ甯嗗獎蹇冩ⅵ甯嗗獎Fri, 12 Jun 2009 18:15:00 GMThttp://www.tkk7.com/rongxh7/archive/2009/06/13/281945.htmlhttp://www.tkk7.com/rongxh7/comments/281945.htmlhttp://www.tkk7.com/rongxh7/archive/2009/06/13/281945.html#Feedback4http://www.tkk7.com/rongxh7/comments/commentRss/281945.htmlhttp://www.tkk7.com/rongxh7/services/trackbacks/281945.html闃呰鍏ㄦ枃

蹇冩ⅵ甯嗗獎 2009-06-13 02:15 鍙戣〃璇勮
]]>
Hibernate(JPA)澶氬澶?ManyToMany)鍏寵仈鏄犲皠涓嶅畬緹庝箣澶?/title><link>http://www.tkk7.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.tkk7.com/rongxh7/archive/2009/06/08/280637.html</guid><wfw:comment>http://www.tkk7.com/rongxh7/comments/280637.html</wfw:comment><comments>http://www.tkk7.com/rongxh7/archive/2009/06/08/280637.html#Feedback</comments><slash:comments>7</slash:comments><wfw:commentRss>http://www.tkk7.com/rongxh7/comments/commentRss/280637.html</wfw:commentRss><trackback:ping>http://www.tkk7.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.tkk7.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.tkk7.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">@Entity<br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_74_489_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /><br /> <img align="top" src="http://www.tkk7.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.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_402_421_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_462_487_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.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.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.com/images/OutliningIndicators/None.gif" alt="" /></span><span style="color: #000000">@Entity<br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_56_352_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" />    <br /> <img align="top" src="http://www.tkk7.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.tkk7.com/images/OutliningIndicators/InBlock.gif" alt="" /></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_270_288_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_327_350_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.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.tkk7.com/images/OutliningIndicators/ExpandedSubBlockEnd.gif" alt="" />    }</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />}</span></span><span style="color: #000000"><br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/images/OutliningIndicators/None.gif" alt="" />org.hibernate.exception.ConstraintViolationException: Could not execute JDBC batch update<br /> <img align="top" src="http://www.tkk7.com/images/OutliningIndicators/None.gif" alt="" />/****鍫嗘爤淇℃伅鐣?***/<br /> <img align="top" src="http://www.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.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.tkk7.com/Images/dot.gif" alt="" /></span><span id="Codehighlighter1_155_173_Open_Text"><span style="color: #000000">{<br /> <img align="top" src="http://www.tkk7.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.tkk7.com/images/OutliningIndicators/ExpandedBlockEnd.gif" alt="" />    }</span></span></div>         鍗沖姞澶氫竴涓?#8220;CascadeType.REMOVE”錛岃繖鏍瘋兘鎶婅鑹睷ole緇欏垹鎺変簡錛屼絾榪炴嫢鏈夎瑙掕壊鐨勬墍鏈夌敤鎴稶ser涔熻綰ц仈鍒犳帀浜嗐傝繖鏍鋒潵鐪嬶紝鏌愪釜鐢ㄦ埛鎷ユ湁璁稿瑙掕壊錛屽氨鍥犱負鍏朵腑鏈夎繖涓涓鑹詫紝灝辮綰ц仈鍒犱簡鏁翠釜鑷繁錛岄偅涓嶆槸寰堝啢鏋夈傝繖涔熶笉絎﹀悎瀹為檯錛?br />         涓漢璁や負錛孒ibernate(JPA)鍦ㄨ緗瀵瑰鍏寵仈鏄犲皠鏃訛紝搴旇鏈夊仛娉曡兘浣垮緱鍙屾柟閮借兘鎺у埗鍏寵仈鍏崇郴鎵嶅ソ錛屾墠絎﹀悎瀹為檯鍚э紒浣嗕簨瀹炰笂錛屽ソ鍍忚繕娌℃湁鍙戠幇鏈塇ibernate(JPA)榪欑鑳藉姏錛?br /> <img src ="http://www.tkk7.com/rongxh7/aggbug/280637.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.tkk7.com/rongxh7/" target="_blank">蹇冩ⅵ甯嗗獎</a> 2009-06-08 13:33 <a href="http://www.tkk7.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"> <p>感谢您访问我们的网站,您可能还对以下资源感兴趣:</p> <a href="http://www.tkk7.com/" title="亚洲av成人片在线观看">亚洲av成人片在线观看</a> <div class="friend-links"> </div> </div> </footer> 主站蜘蛛池模板: <a href="http://zzxngk.com" target="_blank">51午夜精品免费视频</a>| <a href="http://580jp.com" target="_blank">fc2成年免费共享视频网站</a>| <a href="http://huianpawn.com" target="_blank">AV激情亚洲男人的天堂国语</a>| <a href="http://69xjj.com" target="_blank">白白色免费在线视频</a>| <a href="http://rseav.com" target="_blank">成在人线av无码免费高潮水</a>| <a href="http://wwwfafa98.com" target="_blank">四虎国产精品永久免费网址</a>| <a href="http://www44xixi.com" target="_blank">亚洲高清中文字幕免费</a>| <a href="http://ttvv55.com" target="_blank">国产成人3p视频免费观看</a>| <a href="http://ai-xian.com" target="_blank">亚洲中文字幕无码不卡电影</a>| <a href="http://sdnuoyuan.com" target="_blank">亚洲色图校园春色</a>| <a href="http://jjwgzx.com" target="_blank">精品亚洲av无码一区二区柚蜜</a>| <a href="http://626632.com" target="_blank">gogo免费在线观看</a>| <a href="http://zzdyzj.com" target="_blank">久久WWW免费人成一看片</a>| <a href="http://qqcao7.com" target="_blank">国产无遮挡色视频免费视频</a>| <a href="http://djllgs.com" target="_blank">国产亚洲婷婷香蕉久久精品</a>| <a href="http://zhidianzh.com" target="_blank">亚洲国产成人资源在线软件</a>| <a href="http://cpsc-test.com" target="_blank">色欲色欲天天天www亚洲伊</a>| <a href="http://takiku.com" target="_blank">最近国语视频在线观看免费播放</a>| <a href="http://zzxngk.com" target="_blank">在线看片韩国免费人成视频</a>| <a href="http://kj555888.com" target="_blank">波多野结衣一区二区免费视频</a>| <a href="http://pjszlw.com" target="_blank">亚洲av无码一区二区三区网站</a>| <a href="http://www132126.com" target="_blank">激情亚洲一区国产精品</a>| <a href="http://tbw77.com" target="_blank">国产JIZZ中国JIZZ免费看</a>| <a href="http://dehaichem.com" target="_blank">ww在线观视频免费观看</a>| <a href="http://72c5.com" target="_blank">亚洲AV之男人的天堂</a>| <a href="http://szgreater.com" target="_blank">亚洲精品福利网泷泽萝拉</a>| <a href="http://whyandroid.com" target="_blank">羞羞视频免费观看</a>| <a href="http://kimnote.com" target="_blank">99re在线这里只有精品免费</a>| <a href="http://sdzntg.com" target="_blank">日韩在线a视频免费播放</a>| <a href="http://u6u6u6.com" target="_blank">亚洲va在线va天堂va四虎</a>| <a href="http://yw8885.com" target="_blank">粉色视频成年免费人15次</a>| <a href="http://kimnote.com" target="_blank">久久国产色AV免费看</a>| <a href="http://hivzx.com" target="_blank">亚洲成a人片在线观看久</a>| <a href="http://srvz83.com" target="_blank">亚洲毛片在线免费观看</a>| <a href="http://rj150.com" target="_blank">久久国产美女免费观看精品</a>| <a href="http://sdkjkj.com" target="_blank">一个人在线观看视频免费</a>| <a href="http://ytsp88.com" target="_blank">亚洲精品~无码抽插</a>| <a href="http://www65axax.com" target="_blank">国产亚洲一卡2卡3卡4卡新区</a>| <a href="http://ygf123.com" target="_blank">午夜视频免费在线观看</a>| <a href="http://23usxx.com" target="_blank">一区国严二区亚洲三区</a>| <a href="http://33a55.com" 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>