﻿<?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-Kevin's Java Life-文章分类-Hibernate</title><link>http://www.blogjava.net/Kevin/category/6369.html</link><description>    喝一杯咖啡，生活变得从容和清新</description><language>zh-cn</language><lastBuildDate>Thu, 01 Mar 2007 12:15:16 GMT</lastBuildDate><pubDate>Thu, 01 Mar 2007 12:15:16 GMT</pubDate><ttl>60</ttl><item><title>Hibernate错误提示</title><link>http://www.blogjava.net/Kevin/articles/25751.html</link><dc:creator>Kevin</dc:creator><author>Kevin</author><pubDate>Wed, 28 Dec 2005 09:05:00 GMT</pubDate><guid>http://www.blogjava.net/Kevin/articles/25751.html</guid><wfw:comment>http://www.blogjava.net/Kevin/comments/25751.html</wfw:comment><comments>http://www.blogjava.net/Kevin/articles/25751.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Kevin/comments/commentRss/25751.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Kevin/services/trackbacks/25751.html</trackback:ping><description><![CDATA[<P>１．net.sf.hibernate.QueryException: <FONT color=#ff0000>unexpected token</FONT>&nbsp;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;配置文件错误。hibernate.cfg.xml中未增加*.hbm.xml<BR><BR>２．net.sf.hibernate.MappingException: <FONT color=#ff0000>No persister for: com.your.classname<BR><BR></FONT>３．<FONT size=2><FONT size=3>net.sf.hibernate.PropertyAccessException: </FONT><FONT color=#ff0000 size=3>exception setting property value with CGLIB&nbsp;setter of com.your.entity.classname.set***()<BR></FONT>　　</FONT><FONT size=3>也是很常见的错误。引起此错误的原因很多，类型转换出错，NullPoinerExcption等。<BR>　　这里说一下NullPointerException，Hibernate有一个问题，对于java类型为基本类型的字段，如果数据库中该字段为null，则load数据时会触发NullPointerException，从而引起PropertyAccessException。</FONT></P><img src ="http://www.blogjava.net/Kevin/aggbug/25751.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Kevin/" target="_blank">Kevin</a> 2005-12-28 17:05 <a href="http://www.blogjava.net/Kevin/articles/25751.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>HQL问题与解答</title><link>http://www.blogjava.net/Kevin/articles/25573.html</link><dc:creator>Kevin</dc:creator><author>Kevin</author><pubDate>Tue, 27 Dec 2005 07:00:00 GMT</pubDate><guid>http://www.blogjava.net/Kevin/articles/25573.html</guid><wfw:comment>http://www.blogjava.net/Kevin/comments/25573.html</wfw:comment><comments>http://www.blogjava.net/Kevin/articles/25573.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.blogjava.net/Kevin/comments/commentRss/25573.html</wfw:commentRss><trackback:ping>http://www.blogjava.net/Kevin/services/trackbacks/25573.html</trackback:ping><description><![CDATA[<P>HQL是Hibernate的重要特色，对象查询语言与SQL多有不同，而官方又没有提供很详细的手册，所以经常会遇到不同的问题，这里记录下我自己经历过的HQL问题和查找到的答案。<BR>
<HR>

<P></P>
<P><STRONG>没有外键关联的两个表做联合查询<BR></STRONG><BR>有两个表Zsplcxxb(流程表)和Lcsplsb(流程审批历史表)，两个表都有lcbh(流程编号)，但是没有设置外键关联，做以下的查询：</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">from</SPAN><SPAN style="COLOR: #000000">&nbsp;Zsplcxxb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;a&nbsp;</SPAN><SPAN style="COLOR: #0000ff">inner</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">join</SPAN><SPAN style="COLOR: #000000">&nbsp;Lcsplsb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;b&nbsp;</SPAN><SPAN style="COLOR: #0000ff">on</SPAN><SPAN style="COLOR: #000000">&nbsp;a.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;b.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #ff0000">''</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;a.sqrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;a.clrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #ff0000">''</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">order</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;a.zhgxrq&nbsp;</SPAN><SPAN style="COLOR: #0000ff">desc</SPAN></DIV>
<P>出现以下<STRONG>问题</STRONG>（在HibernateConsole中运行）</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="FONT-WEIGHT: bold; COLOR: #800000">1</SPAN><SPAN style="COLOR: #000000">&nbsp;errors&nbsp;occurred&nbsp;</SPAN><SPAN style="COLOR: #0000ff">while</SPAN><SPAN style="COLOR: #000000">&nbsp;listing&nbsp;(</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;calling&nbsp;getPathNames).<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>net.sf.hibernate.QueryException:&nbsp;</SPAN><SPAN style="COLOR: #0000ff">outer</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #808080">or</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">full</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">join</SPAN><SPAN style="COLOR: #000000">&nbsp;must&nbsp;be&nbsp;followed&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;path&nbsp;expression&nbsp;</SPAN><SPAN style="COLOR: #ff0000">[</SPAN><SPAN style="COLOR: #ff0000">from&nbsp;com.aljoin.xzsp.entity.Zsplcxxb&nbsp;as&nbsp;a&nbsp;inner&nbsp;join&nbsp;Lcsplsb&nbsp;as&nbsp;b&nbsp;on&nbsp;a.lczbh&nbsp;=&nbsp;b.lczbh&nbsp;and&nbsp;b.blrbh=''&nbsp;and&nbsp;b.blrbh&nbsp;!=&nbsp;a.sqrbh&nbsp;and&nbsp;a.clrbh&nbsp;!=&nbsp;''&nbsp;order&nbsp;by&nbsp;a.zhgxrq&nbsp;desc</SPAN><SPAN style="COLOR: #ff0000">]</SPAN></DIV>
<P><STRONG><FONT color=#000000>原因</FONT></STRONG>：<BR>&nbsp;<FONT color=#0000ff>只有两个entity有association的状况下，才能使用join</FONT>。比如Zsplcxxb and Lcsplsb有many-to-one的association<BR>另：<FONT color=#0000ff>HQL中没有“on a.lczbh = b.lczbh”这样的语法<BR></FONT><BR><STRONG>解决方法</STRONG>：<BR>１．改用where子句</P>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><SPAN style="COLOR: #0000ff">from</SPAN><SPAN style="COLOR: #000000">&nbsp;Zsplcxxb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;a,&nbsp;Lcsplsb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;b&nbsp;</SPAN><SPAN style="COLOR: #0000ff">where</SPAN><SPAN style="COLOR: #000000">&nbsp;a.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;b.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">?&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;a.sqrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;a.clrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;?&nbsp;</SPAN><SPAN style="COLOR: #0000ff">order</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;a.zhgxrq&nbsp;</SPAN><SPAN style="COLOR: #0000ff">desc</SPAN></DIV>
<P>２．如果是left join or right join，好像只能用<FONT color=#0000ff>session.createSQLQuery() or NamedQuery</FONT>直接执行Native SQL了。<BR>
<HR>
<BR><STRONG>新问题</STRONG>：<BR>　返回的List中每一项都是一个对象数组，包含了Zsplcxxb and Lcsplsb两个entity<BR><BR><STRONG>原因：</STRONG><BR>　“inner join fetch”子句，则 Lcsplsb 读取后立即填充到 Zsplcxxb 中。<BR>　“inner join”子句，则返回两个entity。而where子句等同于“inner join”子句<BR><BR><STRONG>解决方法</STRONG>：加上Select语句<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">select</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #000000">a&nbsp;</SPAN><SPAN style="COLOR: #0000ff">from</SPAN><SPAN style="COLOR: #000000">&nbsp;Zsplcxxb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;a,&nbsp;Lcsplsb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;b&nbsp;</SPAN><SPAN style="COLOR: #0000ff">where</SPAN><SPAN style="COLOR: #000000">&nbsp;a.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;b.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">?&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;a.sqrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;a.clrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;?&nbsp;</SPAN><SPAN style="COLOR: #0000ff">order</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;a.zhgxrq&nbsp;</SPAN><SPAN style="COLOR: #0000ff">desc</SPAN></DIV><BR>
<HR>
<BR><STRONG>新问题</STRONG>：<BR>返回的Zsplcxxb entity有重复的。因为一个流程有多个审批记录，inner join 之后对应每个审批记录都会返回一样的流程。<BR><BR><STRONG>解决方法</STRONG>：加上distinct语句<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">select</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">distinct</SPAN><SPAN style="COLOR: #000000">&nbsp;a&nbsp;</SPAN><SPAN style="COLOR: #0000ff">from</SPAN><SPAN style="COLOR: #000000">&nbsp;Zsplcxxb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;a,&nbsp;Lcsplsb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;b&nbsp;</SPAN><SPAN style="COLOR: #0000ff">where</SPAN><SPAN style="COLOR: #000000">&nbsp;a.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;b.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">?&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;a.sqrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;a.clrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;?&nbsp;</SPAN><SPAN style="COLOR: #0000ff">order</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;a.zhgxrq&nbsp;</SPAN><SPAN style="COLOR: #0000ff">desc</SPAN></DIV><BR>
<HR>
<BR><STRONG>新问题</STRONG>：<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #000000">net.sf.hibernate.JDBCException:&nbsp;Could&nbsp;</SPAN><SPAN style="COLOR: #808080">not</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">execute</SPAN><SPAN style="COLOR: #000000">&nbsp;query<BR><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top>java.sql.SQLException:&nbsp;</SPAN><SPAN style="COLOR: #0000ff">ORDER</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">BY</SPAN><SPAN style="COLOR: #000000">&nbsp;items&nbsp;must&nbsp;appear&nbsp;</SPAN><SPAN style="COLOR: #808080">in</SPAN><SPAN style="COLOR: #000000">&nbsp;the&nbsp;</SPAN><SPAN style="COLOR: #0000ff">select</SPAN><SPAN style="COLOR: #000000">&nbsp;list&nbsp;</SPAN><SPAN style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">SELECT</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">DISTINCT</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">is</SPAN><SPAN style="COLOR: #000000">&nbsp;specified.</SPAN></DIV><STRONG><BR>原因</STRONG>：<BR>如果是SQL的话，使用 distinct a.* 即可。但是对于HQL，没法使用 * 来选择属性，于是Hibernate就认为a.zhgxrq没有出现在select 子句中。<BR><BR><STRONG>解决方法</STRONG>：<BR>使用 order by entity.pk or order by&nbsp;entity 。（真是奇怪，能找到主键，其他属性为什么找不到？）<BR>
<DIV style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee"><IMG src="http://www.blogjava.net/images/OutliningIndicators/None.gif" align=top><SPAN style="COLOR: #0000ff">select</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">distinct</SPAN><SPAN style="COLOR: #000000">&nbsp;a&nbsp;</SPAN><SPAN style="COLOR: #0000ff">from</SPAN><SPAN style="COLOR: #000000">&nbsp;Zsplcxxb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;a,&nbsp;Lcsplsb&nbsp;</SPAN><SPAN style="COLOR: #0000ff">as</SPAN><SPAN style="COLOR: #000000">&nbsp;b&nbsp;</SPAN><SPAN style="COLOR: #0000ff">where</SPAN><SPAN style="COLOR: #000000">&nbsp;a.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">&nbsp;b.lczbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh</SPAN><SPAN style="COLOR: #808080">=</SPAN><SPAN style="COLOR: #000000">?&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;b.blrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;a.sqrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">and</SPAN><SPAN style="COLOR: #000000">&nbsp;a.clrbh&nbsp;</SPAN><SPAN style="COLOR: #808080">!=</SPAN><SPAN style="COLOR: #000000">&nbsp;?&nbsp;</SPAN><SPAN style="COLOR: #0000ff">order</SPAN><SPAN style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">by</SPAN><SPAN style="COLOR: #000000">&nbsp;a&nbsp;</SPAN><SPAN style="COLOR: #0000ff">desc</SPAN></DIV><BR>参考文档：<BR>１．<A href="mailto:javaworld@TW"><FONT color=#000000>javaworld@TW</FONT></A>：<A href="http://www.javaworld.com.tw/jute/post/view?bid=11&amp;id=120681&amp;sty=1&amp;tpg=1&amp;age=0"><FONT color=#ffffff><FONT color=#000000>[問題]關於使用HQL left outer join</FONT> </FONT></A><BR>２．JavaEye：<A class=maintitle href="http://forum.javaeye.com/viewtopic.php?t=9881&amp;view=previous&amp;sid=89ea932a287ac19c0f13873c2e10725a"><FONT color=#000000>『出错』两个没有外键关联的表做inner join的时候 HQL语句出错</FONT></A> <BR>３．Hibernate官方论坛：<A href="http://www.hibernate.org/hib_docs/v3/reference/en/html_single/#queryhql"><FONT color=#000000>Chapter&nbsp;14.&nbsp;HQL: The Hibernate Query Language</FONT></A><img src ="http://www.blogjava.net/Kevin/aggbug/25573.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.blogjava.net/Kevin/" target="_blank">Kevin</a> 2005-12-27 15:00 <a href="http://www.blogjava.net/Kevin/articles/25573.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>