|
This issue hasn't been resolved completely. Maybe I should provide some specific example in the first place. Here it is.
Suppose you have some enumerated status attribute that you would like to store as string in database. Suppose that this status can change over time and you would like to use LocalDate to represent time, and you wrote some AttributeConverter to do the dirty job. How would the code look like?
@ElementCollection
@Enumerated(EnumType.STRING)
Map<LocalDate, Status> status;
That was easy... But... there's one problem! Your AttributeConverter will be ignored becasuse of @Enumerated annotation.
Please, take some time to look at PR I made. Only 2 lines of SimpleValueBinder had to be changed to resolve this issue completely (I hope...). These modifications are easy to review and understand. I added new tests in CollectionElementConversionTest too, but that's less important.
I'll create a new issue as this one seems to be ignored.
|