锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲成色在线综合网站,亚洲女人影院想要爱,久久久久亚洲av无码专区导航 http://m.tkk7.com/mmwy/category/4887.htmlwuyuzh-cnTue, 27 Feb 2007 12:19:21 GMTTue, 27 Feb 2007 12:19:21 GMT60hibernate.hbm2ddl.auto涓巌mport.sqlhttp://m.tkk7.com/mmwy/archive/2006/10/31/78187.htmlmmwymmwyMon, 30 Oct 2006 16:32:00 GMThttp://m.tkk7.com/mmwy/archive/2006/10/31/78187.htmlhttp://m.tkk7.com/mmwy/comments/78187.htmlhttp://m.tkk7.com/mmwy/archive/2006/10/31/78187.html#Feedback0http://m.tkk7.com/mmwy/comments/commentRss/78187.htmlhttp://m.tkk7.com/mmwy/services/trackbacks/78187.html
璁緃ibernate.hbm2ddl.auto涓簎pdate/create-drop/create鍚庯紝鍦╟lasspath涓墧涓涓?import.sql榪涘幓錛宧ibernate鍚姩鏃跺氨浼?xì)鎵цimport.sql鐨勫唴瀹廣?br />
11860 [main] INFO聽 org.hibernate.tool.hbm2ddl.SchemaExport聽 - Running hbm2ddl schema export
11860 [main] DEBUG org.hibernate.tool.hbm2ddl.SchemaExport聽 - import file not found: /import.sql
11875 [main] INFO聽 org.hibernate.tool.hbm2ddl.SchemaExport聽 - exporting generated schema to database


mmwy 2006-10-31 00:32 鍙戣〃璇勮
]]>
mysql 3.23.58 charset璁劇疆瀵筨lob瀛楁鎿嶄綔鐨勫獎鍝?/title><link>http://m.tkk7.com/mmwy/archive/2006/10/12/74800.html</link><dc:creator>mmwy</dc:creator><author>mmwy</author><pubDate>Thu, 12 Oct 2006 07:54:00 GMT</pubDate><guid>http://m.tkk7.com/mmwy/archive/2006/10/12/74800.html</guid><wfw:comment>http://m.tkk7.com/mmwy/comments/74800.html</wfw:comment><comments>http://m.tkk7.com/mmwy/archive/2006/10/12/74800.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/mmwy/comments/commentRss/74800.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/mmwy/services/trackbacks/74800.html</trackback:ping><description><![CDATA[鏈榪戝湪鈥滅帺鈥漢ibernate Annotation錛屽紕浜嗕釜Attachment淇濆瓨榪涙暟鎹簱鐨勬祴璇曪紝闄勪歡鍐呭淇濆瓨鍦╟ontent灞炴ч噷闈€?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">聽聽@Lob<br />聽聽@Column(columnDefinition聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">LongBlob</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">)<br />聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">byte</span><span style="color: rgb(0, 0, 0);">[]聽getContent()聽{<br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽content;<br />聽聽}</span></div>涓寮濮嬶紝閰嶇疆mysql jdbc url濡備笅<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">jdbc.url聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽聽聽聽jdbc:mysql://localhost/test\<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽?useUnicode</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">true\<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽&characterEncoding</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">gbk</span><span style="color: rgb(0, 0, 0);"></span></div>涓嫻嬭瘯錛屾姤閿?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">Caused聽by:聽java.sql.BatchUpdateException:聽Syntax聽error聽or聽access聽violation聽message聽from聽server:聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">You聽have聽an聽error聽in聽your聽SQL聽syntax聽near聽''D0CF11E0A1B11AE1000000000000000000000000000000003E000300FEFF0900060000000000000'聽at聽line聽1</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽at聽com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:</span><span style="color: rgb(0, 0, 0);">1540</span><span style="color: rgb(0, 0, 0);">)</span></div>鍚屾牱鐨勮鍙ワ紝鐩存帴鍦╩ysql鍛戒護(hù)琛屼笅榪愯灝辨病闂錛屽亸鍋廽dbc涓婂氨鏈夎繖鑷瘺鐥呫傛崲jdbc driver鐗堟湰錛屾敼@Lob涓?@Type(type = "org.springframework.orm.hibernate3.support.BlobByteArrayType")錛屾敼hibernate閰嶇疆錛堟瘮濡俬ibernate.jdbc.use_streams_for_binary true錛夛紝鐢氳嚦鏄洿鎺ョ敤jdbc鏉nsert錛屼貢涓冨叓緋熸姌鑵懼崐澶╋紝闂鐓ф棫銆傛渶鍚庡彧濂界敤涓娾滄鈥濇嫑錛屾妸byte[]閰嶆垚String錛屽湪淇濆瓨鐨勬椂鍊欐妸byte[]淇濆瓨鎴恏ex String鏍煎紡錛屽彇鐨勬椂鍊欏啀瑙g爜鍥炴潵銆?br /><br />姝嫑緇堝綊鏄鎷涳紝榪欎袱澶╄佷負(fù)榪欎笢瑗垮績鐑︼紝鏅氫笂鍚冮キ鐨勬椂鍊欐棤鎰忎腑鎯寵搗charset鐨勯棶棰橈紝鎶婁唬鐮佹崱鍥炴潵鍐嶆祴璇曚簡涓涓嬶紝闂瑙e喅錛屽搱鍝堬紒<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">jdbc.url聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽聽聽聽jdbc:mysql://localhost/mmwy_blog\<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽?useUnicode</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">true\<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽&characterEncoding</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">utf-</span><span style="color: rgb(0, 0, 0);">8</span></div>濡傛灉璁炬垚iso-8859-1銆乽tf-8,淇濆瓨涓鐐歸棶棰橀兘娌℃湁錛屾崲鐢╣bk銆乬b2312銆乥ig5涔嬬被鐨勫瓧絎﹂泦錛岄棶棰樺氨鍑烘潵浜嗐?br /><br /><img src ="http://m.tkk7.com/mmwy/aggbug/74800.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/mmwy/" target="_blank">mmwy</a> 2006-10-12 15:54 <a href="http://m.tkk7.com/mmwy/archive/2006/10/12/74800.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>hibernate annotations璇曠敤http://m.tkk7.com/mmwy/archive/2006/10/12/74792.htmlmmwymmwyThu, 12 Oct 2006 07:38:00 GMThttp://m.tkk7.com/mmwy/archive/2006/10/12/74792.htmlhttp://m.tkk7.com/mmwy/comments/74792.htmlhttp://m.tkk7.com/mmwy/archive/2006/10/12/74792.html#Feedback0http://m.tkk7.com/mmwy/comments/commentRss/74792.htmlhttp://m.tkk7.com/mmwy/services/trackbacks/74792.html
1銆乻pring orm support
涓庡師鏉ヤ嬌鐢↙ocalSessionFactoryBean鐩告瘮錛屽彉鍔ㄤ笉澶э紙AnnotationSessionFactoryBean鏈潵灝辨槸浠嶭ocalSessionFactoryBean綾葷戶鎵胯繃鏉ョ殑鍢涳級
聽1聽聽聽<bean
聽2聽聽聽聽聽聽聽聽id="sessionFactory"
聽3聽聽聽聽聽聽聽聽class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"
聽4聽聽聽聽聽聽聽聽parent="AbstractSessionFactory">
聽5聽聽聽聽聽聽聽聽<property聽name="annotatedClasses">
聽6聽聽聽聽聽聽聽聽聽聽聽聽<list>
聽7聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<value>xxx.xxx.xxx.domain.Account</value>
聽8聽聽聽聽聽聽聽聽聽聽聽聽</list>
聽9聽聽聽聽聽聽聽聽</property>
10聽聽聽聽</bean>
11聽聽聽聽<bean
12聽聽聽聽聽聽聽聽id="AbstractSessionFactory"
13聽聽聽聽聽聽聽聽class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"
14聽聽聽聽聽聽聽聽abstract="true">
15聽聽聽聽聽聽聽聽<property
16聽聽聽聽聽聽聽聽聽聽聽聽name="dataSource"
17聽聽聽聽聽聽聽聽聽聽聽聽ref="DataSource"/>
18聽聽聽聽聽聽聽聽<property聽name="hibernateProperties">
19聽聽聽聽聽聽聽聽聽聽聽聽<props>
20聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<prop聽key="hibernate.dialect">${hibernate.dialect}</prop>
21聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<prop聽key="hibernate.show_sql">${hibernate.show_sql}</prop>
22聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<prop聽key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
23聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<prop聽key="hibernate.cache.use_query_cache">${hibernate.cache.use_query_cache}</prop>
24聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽<prop聽key="hibernate.cache.provider_class">${hibernate.cache.provider_class}</prop>
25聽聽聽聽聽聽聽聽聽聽聽聽</props>
26聽聽聽聽聽聽聽聽</property>
27聽聽聽聽聽聽聽聽<property
28聽聽聽聽聽聽聽聽聽聽聽聽name="lobHandler"
29聽聽聽聽聽聽聽聽聽聽聽聽ref="DefaultLobHandler"/>
30聽聽聽聽</bean>
2銆乮d鐨勯厤緗?/b>
闈炲父綆鍗曪紝鍦╥d鐨刧etter涓婇潰鍔犱釜鈥淍Id鈥濆氨鍙互浜嗐傛鏃墮噰鐢ㄧ殑id絳栫暐鏄痡avax.persistence.GenerationType.AUTO錛屼篃鍙互鍐嶅姞涓娾淍GeneratedValue(generator =GenerationType.IDENTITY|GenerationType.SEQUENCE|GenerationType.TABLE)鈥濇崲鎴愬叾瀹冪瓥鐣ャ?br />鎴戠殑搴旂敤閲囩敤鐨勬槸hibernate鐨剈uid絳栫暐錛屽氨涓嶅緱涓嶅湪榪欏効浣跨敤hibernate鐨勬墿灞曚簡
聽聽@Id
聽聽@Column(length聽
=32)
聽聽@GeneratedValue(generator聽
="system-uuid")
聽聽@GenericGenerator(name聽
="system-uuid",聽strategy聽="uuid")

3銆佺駭鑱旂瓥鐣?/b>
鍦╡jb3-persistence.jar涓彧瀹氫箟浜咥LL銆丮ERGE銆丳ERSIST銆丷EFRESH銆丷EMOVE錛屾瘮杈冩伓蹇冪殑灝辨槸錛屽垹闄ゅ璞$殑鏃跺欙紝騫朵笉浼?xì)珩旇仈鍒犻櫎鍏宠仈瀵硅薄锛岃屾槸鐢╱pdate xx set parent_id=null where parent_id=?榪欑被璇彞鎶婂叧緋誨共鎺変簡浜嬨備笉寰楀凡錛屽湪榪欏効鐢ㄤ簡hibernate鐨凞ELETE_ORPHAN銆?br />
聽聽@OneToMany(targetEntity聽=聽Attachment.class)
聽聽@Cascade(value聽
=聽{org.hibernate.annotations.CascadeType.DELETE_ORPHAN,
聽聽聽聽聽聽org.hibernate.annotations.CascadeType.ALL})
聽聽@JoinColumn(name聽
="info_id")
4銆丆ACHE
ejb3-persistence.jar閲岄潰娌℃湁鎵懼埌cache鐨勯厤緗紝緇х畫璇峰嚭hibernate鏉ュ共媧?br />
import聽org.hibernate.annotations.Cache;
import聽org.hibernate.annotations.CacheConcurrencyStrategy;

@Entity
@Table(name聽
="T_INFO")
@Cache(usage聽
=聽CacheConcurrencyStrategy.NONSTRICT_READ_WRITE)
5銆佽嚜瀹氫箟瀛楁綾誨瀷
鎴戠殑POJO涓湁涓涓猵rivate String content;鐨勫睘鎬э紝鎸塭jb3閰嶆垚@Lob鍚庯紝琚鐞嗘垚浜唗ext綾誨瀷錛宼ext 64k鐨勫瓨鍌ㄥ閲忚繕鏄瘮杈冨彲鎬滀簡銆?br />
聽聽@Lob
聽聽@Column(columnDefinition聽
="LongText")



mmwy 2006-10-12 15:38 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 免费看男女下面日出水视频| 亚洲中文字幕AV每天更新| 免费毛片在线播放| 高清永久免费观看| 国产亚洲视频在线观看| 亚洲性无码av在线| 亚洲日本va在线视频观看| 四只虎免费永久观看| 成年女人免费v片| 在免费jizzjizz在线播| 你懂的网址免费国产| 日本在线观看免费高清| 亚洲欧美日韩久久精品| 亚洲国产av一区二区三区丶| 亚洲AV无码成人精品区天堂| 亚洲日本va午夜中文字幕久久| 好男人看视频免费2019中文| 青青青免费国产在线视频小草| 久久aⅴ免费观看| 成人无码WWW免费视频| 一个人晚上在线观看的免费视频| 在线精品自拍亚洲第一区| 亚洲日韩中文字幕无码一区| 亚洲精品综合在线影院| 亚洲另类古典武侠| 亚洲欧洲日韩综合| 亚洲永久中文字幕在线| 亚洲一区二区三区高清| 久久综合亚洲鲁鲁五月天| 亚洲国产人成网站在线电影动漫| 亚洲国产精品嫩草影院在线观看| 中文亚洲成a人片在线观看| 亚洲爽爽一区二区三区| 国产成人精品久久亚洲| 日韩一卡2卡3卡4卡新区亚洲| 国产a v无码专区亚洲av| 亚洲视频在线免费| 在线A亚洲老鸭窝天堂| 亚洲av中文无码乱人伦在线r▽| 亚洲高清在线播放| 亚洲黄色免费网站|