-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: mapping errors or what
PostPosted: Tue Dec 19, 2006 9:36 am 
Newbie

Joined: Tue Dec 19, 2006 9:16 am
Posts: 6
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


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.