Search
Write a publication
Pull to refresh
0
0
Maksim Urusov @urusoff

vk.com/notes_about_java

Send message

Spring Data JPA entity enum converter

Reading time4 min
Views7.1K

Faced with situation when had to map STRING VALUE coming from database TO ENUM. The problem happens when value stored in database differs from enum name. And here we need a workaround to make a mapping. I will describe main points on how I was able to realise it.

Entity field converter?

Information

Rating
Does not participate
Works in
Registered
Activity

Specialization

Backend Developer, Software Architect
From 200,000 ₽
Git
Java
Java Spring Framework
Hibernate
Apache Maven
Intellij IDEA
Junit
SQL
English
Research work