Deepak
Deepak

Reputation: 2895

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]

Upvotes: 1

Views: 454

Answers (1)

James
James

Reputation: 18379

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

Upvotes: 1

Related Questions