Rick
Rick

Reputation: 457

Mapping an enum to String in R2DBC

Using JPA, I can have a member within my entity that maps an enum and persists it as a String:

    @Enumerated(EnumType.STRING)
    private MyEnum myEnum;

As JPA doesn't work with R2DBC, I can't use that nice shorthand. Is there a clean way of effecting this mapping when using R2DBC?

Upvotes: 2

Views: 1693

Answers (1)

KafKafOwn
KafKafOwn

Reputation: 545

It will map enum to string and vice versa by default without the annotation.

Upvotes: 3

Related Questions