JPA Attribute Converter: Difference between revisions
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
=Playground Example= | =Playground Example= | ||
{{External|https://github.com/ovidiuf/playground/tree/master/spring/jpa/attribute-converter}} | |||
=Programming Model= | =Programming Model= | ||
@Convert(converter = ColorConverter.class) | @Convert(converter = ColorConverter.class) |
Revision as of 20:08, 31 October 2018
External
- https://www.thoughts-on-java.org/jpa-21-how-to-implement-type-converter
- https://www.thoughts-on-java.org/jpa-21-type-converter-better-way-to/
Internal
Overview
An attribute converter allows the developer to specify methods to convert between the database and the Java representation of an attribute.
Playground Example
Programming Model
@Convert(converter = ColorConverter.class)