使用hibernate,我如何使用List保留一个类?领域?考虑以下实体类:@EntitypublicclassBlog{privateLongid;privateListlist;@Id@GeneratedValuepublicLonggetId(){returnid;}publicvoidsetId(Longid){this.id=id;}publicListgetList(){returnlist;}publicvoidsetList(Listlist){this.list=list;}}但是,当我尝试保存它时,出现以下错误:[INFO]Anexceptionoccuredwhi
我试过注释一个属性访问器,其返回值是一个映射,如下所示:@MapKeyColumn(name="parameter_name")@ElementCollectionpublicConcurrentHashMapgetParameterValues()这符合hibernate用户指南(第2.2.5.3.4节)。但是,我得到:org.hibernate.AnnotationException:Illegalattempttomapanoncollectionasa@OneToMany,@ManyToManyor@CollectionOfElements:ConfigurationParam
早上好Stackoverflow,我的问题是它给了我错误:FailedtocreatesessionFactoryobject.org.hibernate.AnnotationException:Illegalattempttomapanoncollectionasa@OneToMany,@ManyToManyor@CollectionOfElements:nl.scalda.pasimo.model.employeemanagement.EducationTeam.coachGroups你知道为什么吗?@OneToMany(cascade=CascadeType.ALL,target