I have this weird conversion that should be handled automatically by hibernate and JPA, where it tries to map everything to varchar. I am using Spring boot from jhipster as base.
wrong column type encountered in column [height] in table [user]; found [decimal (Types#DECIMAL)], but expecting [varchar(255) (Types#VARCHAR)]
Entity example:
import javax.persistence.Entity;
import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
@Entity
@Table(name = "user")
public class User extends AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@Column(name = "id")
@NotNull
@Size(max = 36)
private String id;
@Column(name = "height")
private BigDecimal height;
For liquibase the field is
<column name="height" type="number(3,2)"/>
What am I doing wrong that I have to add columnDefinition = "DECIMAL"? I have never had to do it manually. It also happens with Boolean entity to boolean DB or all date/timestamp types. I always have to add columnDefition property to column field.
I am guessing there is a converter that is not doing its job and I have misconfigured it?