I am using MySQL 5.5 and hibernate 3. I created a view in my database and also created an object corresponding to it using the salto db generator. When I try to execute my code, creating a bean for a factory session does not give me the following error
org.springframework.beans.factory.BeanCreationException: an error occurred while creating a bean with the name "SessionFactory" defined in the key path resource [persistence-context.xml]: the init method call failed; The nested exception is org.hibernate.AnnotationException: The identifier is not specified for the object: com.viewer.common.entity.ViewEntity
So, I ask if we need a primary key to create objects ???
source share