I have the following code (hibernate 3.2):
public List selectListEducation()
{
List items = getHibernateTemplate().findByNamedQuery("selectListEducation");
return items;
}
And following map file:
<?xml version="1.0"?>
<!DOCTYPE hibernate-mapping PUBLIC
"-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-mapping-3.0.dtd">
<hibernate-mapping auto-import="true" package="domain" default-access="field">
<sql-query name="selectListEducation">
<return alias="edu" class="Education"/>
<![CDATA[
select
edu.EMPLID as (edu.EMPLID), edu.EDUCATION_ID as (edu.EDUCATION_ID ),
edu.BEGIN_YEAR as (edu.BEGIN_YEAR), edu.END_YEAR as (edu.END_YEAR), edu.INSTITUTION as (edu.INSTITUTION), edu.LOCATION as (edu.LOCATION), edu.COUNTRY as (edu.COUNTRY), edu.DEGREE as (edu.DEGREE), edu.STUDY_FIELD as (edu.STUDY_FIELD), edu.CHANGEUSER as (edu.CHANGEUSER), edu.CHANGEDT as (edu.CHANGEDT) from education edu
order by 2
]]>
</sql-query>
</hibernate-mapping>
I got the following errors:
[java] =========================================
[java] org.springframework.orm.hibernate3.HibernateSystemException: Unknown
entity: domain.Education; nested exception is org.hibernate.MappingException: U
nknown entity: domain.Education
Any ideas?
-Henry
|