首页 > 代码库 > Mingyang.net:No identifier specified for entity

Mingyang.net:No identifier specified for entity

org.hibernate.AnnotationException: No identifier specified for entity: net.mingyang.modules.system.ConfigGroup    org.hibernate.cfg.InheritanceState.determineDefaultAccessType(InheritanceState.java:277)    org.hibernate.cfg.InheritanceState.getElementsToProcess(InheritanceState.java:224)    org.hibernate.cfg.AnnotationBinder.bindClass(AnnotationBinder.java:775)    org.hibernate.cfg.Configuration$MetadataSourceQueue.processAnnotatedClassesQueue(Configuration.java:3788)    org.hibernate.cfg.Configuration$MetadataSourceQueue.processMetadata(Configuration.java:3742)    org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1410)    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1844)    org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1928)    ......

原来是没有定义@Id。