I got the Oracle error with the following HQL:
Code:
select
elements(vo.descriptions)
from
CompanyVO vo
order by
elements(vo.descriptions)
Any ideas? Thanks in advance!
P.S. Problem is table alias "descriptio1_" instead of "descriptio2_" is used in order by clause.
Martin
Hibernate version: 2.1.6
Mapping documents:Code:
<map name="descriptions"
table="COMPANY_DESCR"
lazy="false"
cascade="all"
>
<key column="COMPANYOBJID"/>
<index column="LOCALEINFOOBJID" type="string"/>
<element column="DESCRIPTION" type="string"/>
</map>
Full stack trace of any exception that occurs:net.sf.hibernate.JDBCException: Could not execute query java.sql.SQLException: ORA-00904: invalid column name
Name and version of the database you are using:Oracle 8.1.7
Generated SQl:Code:
SELECT
descriptio2_.description as x0_0_
FROM
company companyvo0_,
company_descr descriptio2_
WHERE
companyvo0_.objId = descriptio2_.companyobjid
ORDER BY
descriptio1_.description