﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>BlogJava-希望与大家一起分享Java-文章分类-Hibernate技术</title><link>http://www.blogjava.net/haoqingshi/category/2735.html</link><description /><language>zh-cn</language><lastBuildDate>Sat, 03 Mar 2007 10:09:30 GMT</lastBuildDate><pubDate>Sat, 03 Mar 2007 10:09:30 GMT</pubDate><ttl>60</ttl><item><title>Java数据类型，Hibernate数据类型，标准sql数据类型之间的对应表</title><link>http://www.blogjava.net/haoqingshi/articles/10912.html</link><dc:creator>Java&amp;Inter</dc:creator><author>Java&amp;Inter</author><pubDate>Wed, 24 Aug 2005 06:03:00 GMT</pubDate><guid>http://www.blogjava.net/haoqingshi/articles/10912.html</guid><wfw:comment>http://www.blogjava.net/haoqingshi/comments/10912.html</wfw:comment><comments>http://www.blogjava.net/haoqingshi/articles/10912.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/haoqingshi/comments/commentRss/10912.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/haoqingshi/services/trackbacks/10912.html</trackback:ping><description><![CDATA[<TABLE style="WIDTH: 100%; TEXT-ALIGN: left" cellSpacing=2 cellPadding=2 border=1>
<TBODY>
<TR>
<TD style="BACKGROUND-COLOR: rgb(204,204,204)"><SMALL>Java数据类型</SMALL></TD>
<TD style="BACKGROUND-COLOR: rgb(204,204,204)"><SMALL>Hibernate数据类型</SMALL></TD>
<TD style="BACKGROUND-COLOR: rgb(204,204,204)"><SMALL>标准SQL数据类型<BR>(PS:对于不同的DB可能有所差异)</SMALL></TD></TR>
<TR>
<TD>byte、java.lang.Byte</TD>
<TD>byte</TD>
<TD>TINYINT</TD></TR>
<TR>
<TD>short、java.lang.Short</TD>
<TD>short</TD>
<TD>SMALLINT</TD></TR>
<TR>
<TD>int、java.lang.Integer</TD>
<TD>integer</TD>
<TD>INGEGER</TD></TR>
<TR>
<TD>long、java.lang.Long</TD>
<TD>long</TD>
<TD>BIGINT</TD></TR>
<TR>
<TD>float、java.lang.Float</TD>
<TD>float</TD>
<TD>FLOAT</TD></TR>
<TR>
<TD>double、java.lang.Double</TD>
<TD>double</TD>
<TD>DOUBLE</TD></TR>
<TR>
<TD>java.math.BigDecimal</TD>
<TD>big_decimal</TD>
<TD>NUMERIC</TD></TR>
<TR>
<TD>char、java.lang.Character</TD>
<TD>character</TD>
<TD>CHAR(1)</TD></TR>
<TR>
<TD>boolean、java.lang.Boolean</TD>
<TD>boolean</TD>
<TD>BIT</TD></TR>
<TR>
<TD>java.lang.String</TD>
<TD>string</TD>
<TD>VARCHAR</TD></TR>
<TR>
<TD>boolean、java.lang.Boolean</TD>
<TD>yes_no</TD>
<TD>CHAR(1)('Y'或'N')</TD></TR>
<TR>
<TD>boolean、java.lang.Boolean</TD>
<TD>true_false</TD>
<TD>CHAR(1)('Y'或'N')</TD></TR>
<TR>
<TD>java.util.Date、java.sql.Date</TD>
<TD>date</TD>
<TD>DATE</TD></TR>
<TR>
<TD>java.util.Date、java.sql.Time</TD>
<TD>time</TD>
<TD>TIME</TD></TR>
<TR>
<TD>java.util.Date、java.sql.Timestamp</TD>
<TD>timestamp</TD>
<TD>TIMESTAMP</TD></TR>
<TR>
<TD>java.util.Calendar</TD>
<TD>calendar</TD>
<TD>TIMESTAMP</TD></TR>
<TR>
<TD>java.util.Calendar</TD>
<TD>calendar_date</TD>
<TD>DATE</TD></TR>
<TR>
<TD>byte[]</TD>
<TD>binary</TD>
<TD>VARBINARY、BLOB</TD></TR>
<TR>
<TD>java.lang.String</TD>
<TD>text</TD>
<TD>CLOB</TD></TR>
<TR>
<TD>java.io.Serializable</TD>
<TD>serializable</TD>
<TD>VARBINARY、BLOB</TD></TR>
<TR>
<TD>java.sql.Clob</TD>
<TD>clob</TD>
<TD>CLOB</TD></TR>
<TR>
<TD>java.sql.Blob</TD>
<TD>blob</TD>
<TD>BLOB</TD></TR>
<TR>
<TD>java.lang.Class</TD>
<TD>class</TD>
<TD>VARCHAR</TD></TR>
<TR>
<TD>java.util.Locale</TD>
<TD>locale</TD>
<TD>VARCHAR</TD></TR>
<TR>
<TD>java.util.TimeZone</TD>
<TD>timezone</TD>
<TD>VARCHAR</TD></TR>
<TR>
<TD>java.util.Currency</TD>
<TD>currency</TD>
<TD>VARCHAR</TD></TR></TBODY></TABLE><BR><img src ="http://www.blogjava.net/haoqingshi/aggbug/10912.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/haoqingshi/" target="_blank">Java&Inter</a> 2005-08-24 14:03 <a href="http://www.blogjava.net/haoqingshi/articles/10912.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>Hibernate2升级到Hibernate3要注意的问题(转贴)</title><link>http://www.blogjava.net/haoqingshi/articles/10792.html</link><dc:creator>Java&amp;Inter</dc:creator><author>Java&amp;Inter</author><pubDate>Tue, 23 Aug 2005 06:39:00 GMT</pubDate><guid>http://www.blogjava.net/haoqingshi/articles/10792.html</guid><wfw:comment>http://www.blogjava.net/haoqingshi/comments/10792.html</wfw:comment><comments>http://www.blogjava.net/haoqingshi/articles/10792.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/haoqingshi/comments/commentRss/10792.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/haoqingshi/services/trackbacks/10792.html</trackback:ping><description><![CDATA[<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">這篇文件整理了一些我改寫</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">筆記時，從</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">到</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中所遇過的不同點，如果發現有其它重要的改變，將隨時新增至這個文件中。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"> DTD </SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件的引用</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR>hibernate.cfg.xml</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中對</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">DTD</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">文件的引用必須改變，在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中是這樣：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">...<BR>&lt;!DOCTYPE hibernate-configuration <BR>&nbsp; &nbsp; PUBLIC </SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">"-//Hibernate/Hibernate Configuration DTD//EN" <BR>&nbsp; &nbsp; "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd"</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&gt;<BR>...</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中必須這樣：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">...<BR>&lt;!DOCTYPE hibernate-configuration PUBLIC<BR>&nbsp;&nbsp;&nbsp; </SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">"-//Hibernate/Hibernate Configuration DTD 3.0//EN"<BR>&nbsp;&nbsp;&nbsp; "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd"</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&gt;<BR>...</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">映射文件在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">時是這樣：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">...<BR>&lt;!DOCTYPE hibernate-mapping <BR>&nbsp; &nbsp; PUBLIC </SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">"-//Hibernate/Hibernate Mapping DTD//EN" <BR>&nbsp; &nbsp; "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&gt;<BR>...</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中是這樣：</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">...<BR>&lt;!DOCTYPE hibernate-mapping <BR>&nbsp;&nbsp;&nbsp; PUBLIC </SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">"-//Hibernate/Hibernate Mapping DTD 3.0//EN" <BR>&nbsp;&nbsp;&nbsp; "http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd"</SPAN></B><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&gt; <BR>...</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p>&nbsp;</o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt">package </SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的改變</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 12pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR>Hibernate 2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">API</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的頂層</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">package</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">名稱是</SPAN><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">net.sf.hibernate</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中是</SPAN><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">org.hibernate</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，例如</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 2</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">net.sf.hibernate.SessionFactory</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">在</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中改為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">org.hibernate.SessionFactory</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">取消</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"> Session </SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"> find()</SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt">iterate() </SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 12pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR>Session</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">中的</SPAN><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">find()</SPAN></B><B><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法被取消了</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，必須使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Session</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">createQuery()</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">建立</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Query</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">實例，並使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">list()</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">方法來取代。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Session</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的</SPAN><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: red; mso-font-kerning: 0pt">iterate()</SPAN></B><B><SPAN style="FONT-SIZE: 10pt; COLOR: red; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">被取消了</SPAN></B><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，由</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Query</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">介面上的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">iterator()</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">來取代，詳請看</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"> <SPAN lang=EN-US><A href="http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/QueryListIterator.html"><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">Query.list()</SPAN></B><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">、</SPAN></B><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">iterator()</SPAN></B></A></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt">HQL </SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增語句</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"> update </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">語句</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Query query = session.createQuery("update User set age=30 where id=1");<BR>query.executeUpdate();</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"> delete </SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">語句</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">Query query = session.createQuery("delete User where age&lt;20");<BR>query.executeUpdate();</SPAN></B><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自定義</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"> insert</SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt">update</SPAN></B><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt">delete <o:p></o:p></SPAN></B></P></DIV>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt; mso-pagination: widow-orphan"><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><BR>Hibernate 3</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">的映射文件中新增了</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&lt;sql-insert&gt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&lt;sql-update&gt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">與</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">&lt;sql-delete&gt;</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">三個標籤，您可以在這三個標籤中使用</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">SQL</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">自定義您的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">INSERT</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">UPDATE</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">、</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt">DELETE</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，也就是儲存、更新、刪除資料時的行為，詳請看</SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"> <SPAN lang=EN-US><A href="http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/CustomInsertUpdateDelete.html"><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">自定義</SPAN></B><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none"> insert</SPAN></B><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">、</SPAN></B><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">update</SPAN></B><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">、</SPAN></B><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">delete</SPAN></B></A></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; COLOR: black; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; COLOR: black; mso-font-kerning: 0pt"><o:p></o:p></SPAN></P>
<DIV style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN-LEFT: 0cm; BORDER-LEFT: dimgray 6pt solid; MARGIN-RIGHT: 214.2pt; PADDING-TOP: 0cm; BORDER-BOTTOM: dimgray 1pt solid; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt">
<P class=MsoNormal style="BORDER-RIGHT: medium none; PADDING-RIGHT: 0cm; BORDER-TOP: medium none; PADDING-LEFT: 0cm; PADDING-BOTTOM: 0cm; MARGIN: 18pt 0cm 6pt; BORDER-LEFT: medium none; PADDING-TOP: 0cm; BORDER-BOTTOM: medium none; mso-pagination: widow-orphan; mso-border-left-alt: solid dimgray 6.0pt; mso-border-bottom-alt: solid dimgray .75pt; mso-outline-level: 4; mso-padding-alt: 0cm 0cm 0cm 0cm"><B><SPAN style="COLOR: dimgray; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">其它</SPAN></B><B><SPAN lang=EN-US style="COLOR: dimgray; mso-font-kerning: 0pt"><o:p></o:p></SPAN></B></P></DIV>
<UL type=disc>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Expression</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">類別雖仍可使用，但新增</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Restrictions</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">類別作為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Expression</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">類別的替代。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增</SPAN><SPAN style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <SPAN lang=EN-US><A href="http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/DetchedCriteria.html"><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">DetchedCriteria</SPAN></B></A></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增</SPAN><SPAN style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <SPAN lang=EN-US><A href="http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/DynamicModel.html"><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">動態模型（</SPAN></B><B><SPAN style="COLOR: #444444; TEXT-DECORATION: none; mso-bidi-font-size: 12.0pt; text-underline: none">Dynamic Model</SPAN></B><B><SPAN style="COLOR: #444444; FONT-FAMILY: 新細明體; TEXT-DECORATION: none; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'; mso-bidi-font-size: 12.0pt; text-underline: none">）</SPAN></B></A></SPAN></SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">HibernateException </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">變為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Checked exception</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Interceptor </SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">新增了幾個方法。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Lazy Initialization</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">預設為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> true</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，不想使用的話，必須在映射文件中設定</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">lazy</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">屬性為</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">false</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI>
<LI class=MsoNormal style="MARGIN: 0cm 0cm 0pt; COLOR: black; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt; mso-pagination: widow-orphan; mso-margin-top-alt: auto; mso-margin-bottom-alt: auto"><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">可透過</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">org.hibernate.tool.instrument.InstrumentTask</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">對</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">.class</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">檔進行</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">buildtime bytecode instrumentation</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">，實現屬性的</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt">Lazy Initialization</SPAN><SPAN style="FONT-SIZE: 10pt; FONT-FAMILY: 新細明體; mso-font-kerning: 0pt; mso-ascii-font-family: 'Times New Roman'; mso-hansi-font-family: 'Times New Roman'">。</SPAN><SPAN lang=EN-US style="FONT-SIZE: 10pt; mso-font-kerning: 0pt"> <o:p></o:p></SPAN></LI></UL>
<P class=MsoNormal style="MARGIN: 0cm 0cm 0pt"><SPAN lang=EN-US><o:p>&nbsp;原文出自：<A href="http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/Hibernate2ToHibernate3.html">http://www.caterpillar.onlyfun.net/Gossip/HibernateGossip/Hibernate2ToHibernate3.html</A></o:p></SPAN></P><img src ="http://www.blogjava.net/haoqingshi/aggbug/10792.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/haoqingshi/" target="_blank">Java&Inter</a> 2005-08-23 14:39 <a href="http://www.blogjava.net/haoqingshi/articles/10792.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>