I am using MySQL 5.5 and hibernate 3. I have created a view in my database and also created an entity corresponding to it using salto db generator. When I try to execute my code the bean creation for session factory fails giving me the following error
org. Cerframework.beans.sisy.BeanCreationException: Error Creat bean with name SessionFactory defined in cell pathresource [persistence-context.xml]: 援引惯用法失败;nes例外是org.hibernate。 AnnotationException: No identification specified for entities: com.viewer.commonentity.ViewEntity
因此,我问,我们是否需要建立实体的主要关键?