I wonder if it's posible to map Enum VARIABLE and DB. I want to save in database the yellow values (variables of enum)
The enum is used in this class:
@Getter
@Setter
@Table(name = "TIPOS_MOVIMIENTO")
@Entity
public class TipoMovimiento {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int id;
@Column
@Enumerated(EnumType.STRING)
private TipoMov tipo;
public String getTipo() {
return tipo.getTipoNombre();
}
@OneToMany(mappedBy = "tipoMov")
private List<Movimiento> movimientos;
My DTO class:
@Getter
public class TipoMovimientoDto implements DtoEntity {
private TipoMov tipo;
}
I've tried DTO with
@Convert(converter = TipoMovEnumConverter.class) private TipoMov tipo;
But it doesn't works