org.hibernate.AnnotationException: No identifier specified for entity - even when it was

前端 未结 3 1876

I have the following configuration:



        
3条回答
  •  渐次进展
    2020-12-14 00:52

    I faced the same error.I solved it and figured out i didn't put @Id annotations in id field in my Entity class.

    @Entity
    @Table(name="geonames")
    public class Geoname implements Serializable {
    
        @Column(name="geonameid")
        private Long geonameid = null;
    }
    

提交回复
热议问题