I have to integrate with a library of domain classes that contain @Entity annnotations. For example:
I copied the Physician class to a local test project and changed the package to be my local test project. Everything worked fine. When I try to access the actual library by setting the package in the 'packagesToScan' attribute of the session factory I getCode:@Entity @Table (name="physician") public class Physician { @Column (name="specialty") public String getSpecialty() { return specialty; }Code:org.hibernate.hql.ast.QuerySyntaxException: Physician is not mapped [FROM Physician]I don't see anything about Physician being mapped in the log files but I have to assume Hibernate knows what it's talking about. What should I look for to determine what is not happening in the mapping department?Code:<bean id="sessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean" p:dataSource-ref="dataSource" p:configLocation="${hibernate.config}" p:packagesToScan="com.medlibrary.domain.**.*, com.mycompany.myapp " />
-=bils


Reply With Quote