'value is of jsonb but expression is of type bigint error in postgresql
I am trying to migrate from oracle to postgresql. In oracle, we have @Lob data to a field which is used to hold huge amount of data.
@Lob
private String A_Value;
For postgresql, we need to use json/jsonb in place of lob data. I have done the below changes for that.
@TypeDefs({
@TypeDef(name="json", typeClass=JsonStringType.class),
@TypeDef(name="jsonb", typeClass=JsonBinaryType.class)
})
public class AbcM implements Serializable{
---------
@Type(type="jsonb")
@Column(name="A_Value", columnDefinition="jsonb")
private String A_Value;
}
@Repository
public interface ARepository extends JPARepository<AuditM,Long>{}
##Impl class to save data
@Override
@Async
public CompletableFuture<String> saveRequest(AbcM model){
ARepository.saveAndFlush(model);
}
##ERROR: column A_Value is of type jsonb but expression is of type bigint rewrite or cast the expression
Could you please suggest what should I do to save the data without any error.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
