开发者

collections of collection

开发者 https://www.devze.com 2023-02-05 02:25 出处:网络
private Map<Integer,List<ProgramCourse>> map where ProgramCourse is a domain class in my开发者_JAVA技巧 project and the above map is a field of my domain class Program when i am running th

private Map<Integer,List<ProgramCourse>> map where ProgramCourse is a domain class in my开发者_JAVA技巧 project and the above map is a field of my domain class Program when i am running the project following exception is coming.

Use of @OneToMany or @ManyToMany targeting an unmapped class: com.sparshsoft.drps.domain.Program.programScheme[java.util.List]


JPA does not support nested collections. 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.

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

0

精彩评论

暂无评论...
验证码 换一张
取 消