Codec Support for Java enums

Description

Add the possibility to have enumerated values in collections :

ie :

@Enumerated(EnumType.STRING)
private Set<MyEnum> enums;

@EnumeratedKey(EnumType.STRING)
private Map<MyEnum, Date> enumsByDates;

@EnumeratedValue(EnumType.STRING)
private Map<String, MyEnum> enums2;

Environment

None

Pull Requests

None

Activity

Show:
DOAN DuyHai
February 11, 2015, 1:25 PM

Rather than introducing new enums, I would suggest adding new attributes to the current @Enumerated annotation:

Something like this:

Andrew Mast
August 21, 2015, 4:35 PM
DOAN DuyHai
November 2, 2015, 1:56 PM

Hint: with Java8, you can put annotation in type parameters:

Alexandre Dutra
November 2, 2015, 6:52 PM

We are considering drop support for @Enumerated in our next major release.

Enum support will be provided by codecs in the new driver-extras module (see ):

Alexandre Dutra
November 19, 2015, 10:14 AM

and this has been fixed in the 3.0.0-alpha5 version. Feel free to reopen if this feature is critical for you and you cannot upgrade to 3.0.

Fixed

Assignee

Alexandre Dutra

Reporter

T

Labels

None

PM Priority

None

Affects versions

Fix versions

Pull Request

None

Doc Impact

None

Size

None

External issue ID

None

External issue ID

None

Components

Priority

Critical
Configure