摘要:
用hibernateTemplate().find()方法时出现以下错误org.springframework.orm.hibernate3.HibernateQueryException: Manager is not mapped [from Manager]; nested exception is org.hibernate.hql.ast.QuerySyntaxException: Manager is not mapped [from Manager]纠结了好长时间,上网一查才知道好多人出现过相同问题,原因一般有:1,hbm.xml 没在beans.xml中配置com.fzb.sh 阅读全文
posted @ 2013-06-21 22:24
Kent_fighting
阅读(485)
评论(0)
推荐(0)
摘要:
这两种SessionFactoryBean是配置hibernate配置实体及字段与表的映射时的两种不同方法。他们的使用与否在applicationContext.xml中配置,具体配置快去学习吧!一、annotation是注释、注解 的意思,在hibernate配置实体及字段与表的映射时,annotationSessionFactoryBean提供一种注解的方式来映射,它可以依赖@注解通过实体类生成表(包括字段、主键···)。这种方法是spring2.5以后才有的。利用注解的简单例子如下:[java] view plaincopyprint?packagecn.c 阅读全文
posted @ 2013-06-21 22:11
Kent_fighting
阅读(3048)
评论(0)
推荐(1)
浙公网安备 33010602011771号