2013-09-26 31 views
0

没有任何数据类型我写了下面的HQL:这个HQL有什么问题?获取节点

select currency, rate from Currency as currency left outer join ExchangeRate as rate where currency.code = rate.currencyCode 

当我执行它,我得到:No data type for node: org.hibernate.hql.ast.tree.IdentNode \r\n \\-[IDENT] IdentNode: 'rate' {originalText=rate}\r\n

我发现了计算器的一些问题,如What's wrong with this HQL? "No data type for node"但对我来说率的定义在我的加入。 建议表示赞赏。

+0

你确定代码是foriegn密钥吗?你能发送表约束和实体类吗? –

+0

是的,代码是FK。而且我现在无法访问代码,但这些字段非空,一种货币>很多费率。它们都出现在我的persistence.xml中 –

回答

0

货币可能包含费率作为字段名称之一。你可以分享表格字段名称吗?

+0

Currency:code,description |汇率:currencyCode,toCurrencyCode,conversionRate –

+0

逗号后有空格..避免使用空格。 – Hareesh