In the past, I've fixed the FQ class name problem by changing 
@Entity(name="person") to @Entity. The name specified in this annotations 
creates an alias for HQL.

Hope this helps,

Matt

On May 11, 2010, at 3:19 AM, Gu Gu wrote:

> Hi,
> 
> My app is:
> Appfuse 2.1.0-M1
> Hibernate and Struts 2
> 
> I followed the tutorial <http://appfuse.org/display/APF/Using+Hibernate>, 
> created an interface and implemented it accordingly. I've properly added my 
> model object (CableSystem) in hibernate.cfg.xml (under /main/resources). The 
> problem is when i call         
> List<CableSystem> cableSystems = getHibernateTemplate().find("from 
> CableSystem where name=?", cableSystemName);
> It'd return 
>  HibernateQueryException :: CableSystem is not mapped.
> 
> When I looked through, I found another hibernate.cfg.xml under 
> /test/resources so I've removed it and tried but didn't work as well.
> 
> Right now I've solved it by having using a FQN 
> (org.mycompany.model.CableSystem). But I'd be glad to get it solved so that I 
> can use "CableSystem" instead.
> 
> Thanks,
> Gu
> 

Reply via email to