简体   繁体   English

收藏集

[英]collections of collection

private Map<Integer,List<ProgramCourse>> map where ProgramCourse is a domain class in my project and the above map is a field of my domain class Program when i am running the project following exception is coming. private Map<Integer,List<ProgramCourse>>映射,其中ProgramCourse是我的项目中的域类,而上面的映射是我正在运行项目时出现异常后的域类Program的字段。

Use of @OneToMany or @ManyToMany targeting an unmapped class: com.sparshsoft.drps.domain.Program.programScheme[java.util.List] 使用@OneToMany或@ManyToMany定位未映射的类:com.sparshsoft.drps.domain.Program.programScheme [java.util.List]

JPA does not support nested collections. JPA不支持嵌套集合。 You will need to change it to a simpler data structure, initialize it in get/set methods, or create an object that defines the relationship. 您将需要将其更改为更简单的数据结构,在get / set方法中对其进行初始化,或者创建一个定义关系的对象。

See, http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Nested_Collections.2C_Maps_and_Matrices 参见http://en.wikibooks.org/wiki/Java_Persistence/Relationships#Nested_Collections.2C_Maps_and_Matrices

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM