JPA 2.1 Converter Annotation

I am using JPA 2.1 Converters so i annotate fields to be converted with @Convert.

Specification says that I should annotate my Converter class (implementation of AttributeConverter) with @Converter

The Converter annotation specifies that the annotated class is a
converter and defines its scope. A converter class must be annotated
with the Converter annotation or defined in the XML descriptor as a
converter. (from JSR 338: JavaTM Persistence API, Version 2.1

But I noticed that the behaviour with @Converter annotation and without @Converter annotation is the same. The field is properly converted. Do I really need this annotation? What it is supposed to do?

Source: java

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.