strange Persistence exception with a List type [message #790175] |
Fri, 03 February 2012 22:53 |
Patricia Goldweic Messages: 34 Registered: October 2010 |
Member |
|
|
My code runs into the following exception:
-----------------------------------------------------------------------
Internal Exception: Exception [EclipseLink-7203] (Eclipse Persistence Services - 2.0.0.v20091127-r5931): org.eclipse.persistence.exceptions.ValidationException
Exception Description: The mapping element [communities] for the class [class edu.northwestern.at.teams.persistence.Person] has an unsupported collection type [class java.util.List]. Only Set, List, Map and Collection are supported.
------------------------------------------------------------------------
when the Persistence unit is being loaded. The class in question has a field as follows:
/** A list of communities a person participates in */
@OneToMany
@JoinTable
(
name="person_community",
joinColumns= @JoinColumn(name="personId", referencedColumnName="id"),
inverseJoinColumns= @JoinColumn(name="communityId", referencedColumnName="id")
)
private List<Community> communities;
Where both Person and Community are Entity types. Why is the exception being thrown, given that I am using a List<Community> type, and List is supposed to be a supported type, as even the error message suggests?
|
|
|
Powered by
FUDForum. Page generated in 0.01708 seconds