Hi,
I have a Entity with a field which I want to be an Enum.
@Column(name = "TEMPRATURE_ZONE")
@Enumerated(STRING)
private TemperatureRegime tempratureZone;
The Enum is defined as follows:
public enum TemperatureRegime {
AMBIENT,
CHILL
}
The data in my table for this field is always "AMBIENT" or "CHILL" yet when I do a findAll query on the table I am getting the following exception:
Exception [EclipseLink-116] (Eclipse Persistence Services - 2.1.0.v20100614-r7608): org.eclipse.persistence.exceptions.DescriptorException
Exception Description: No conversion value provided for the value [Chill] in field [LOCATION_GROUP.TEMPRATURE_ZONE].
Mapping: org.eclipse.persistence.mappings.DirectToFieldMapping[tempratureZone-->LOCATION_GROUP.TEMPRATURE_ZONE]
Descriptor: RelationalDescriptor(com.company.location.LocationGroup --> [DatabaseTable(LOCATION_GROUP)])
I can't see what the problem is, any ideas?
Cheers,
James