The MapKeyConvert annotation specifies that a named converter should be used
with the corresponding mapped attribute key column. The MapKeyConvert
annotation has the following reserved names:
- "serialized": Uses a SerializedObjectConverter on the associated mapping. When using a SerializedObjectConverter the database representation is a binary field holding a serialized version of the object and the object-model representation is a the actual object.
- "class-instance": Uses an ClassInstanceConverter on the associated mapping. When using a ClassInstanceConverter the database representation is a String representing the Class name and the object-model representation is an instance of that class built with a no-args constructor.
- "xml": Uses an SerializedObjectConverter with the XMLSerializer on the associated mapping. When using a XMLSerializer the database representation is a character field holding a serialized version of the object and the object-model representation is a the actual object.
- "json": Uses an SerializedObjectConverter with the JSONSerializer on the associated mapping. When using a JSONSerializer the database representation is a character field holding a serialized version of the object and the object-model representation is a the actual object.
- "kryo": Uses an SerializedObjectConverter with the org.eclipse.persistence.sessions.serializers.kryo.KryoSerializer on the associated mapping. When using a org.eclipse.persistence.sessions.serializers.kryo.KryoSerializer the database representation is a binary field holding a serialized version of the object and the object-model representation is a the actual object.
- "none": Places no converter on the associated mapping. This can be used to override a situation where either another converter is defaulted or another converter is set.
When these reserved converters are not used, it is necessary to define a converter to use using the Converter annotation.
- See Also:
- Author:
- Guy Pelletier
-
Optional Element Summary
Optional Elements
-
Element Details
-
value
String valueThe name of the converter to be used.- Default:
"none"
-