Hello,
I'm working on a dictionary-portlet and I'm using spring + hibernate.
For the SessionFactory I'm using the AnnotationSessionFactoryBean provied by spring. My application-context looks like this:
<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> <property name="dataSource" ref="mssqlDataSource"/> <property name="hibernateProperties"> <props> <prop key="current_session_context_class">thread</prop> <prop key="hbm2ddl.auto">validate</prop> <prop key="hibernate.dialect">org.hibernate.dialect.SQLServerDialect</prop> </props> </property> <property name="annotatedClasses"> <list> <value>com.os.intranet.dictionary.persistent.Terms</value> </list> </property> </bean>
session.createQuery("from Term");
org.hibernate.hql.ast.QuerySyntaxException: Terms is not mapped [from Term]