简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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