I want to put enum in my entity. But I have an error with validation which JPA wonts smallint set as enum. How I can solve this issue.
"Schema-validation: wrong column type encountered in column [status] in table [
order
]; found [int2 (Types#SMALLINT)], but expecting [int4 (Types#INTEGER)]"[enter image description here]
Add columnDefinition="int2" at OrderStatus in your entity.
@Column(name = "status", columnDefinition = "int2")
OrderStatus status;
Tested on spring boot 2.2.10
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With