I have a variable of type Boolean in my entity class by name "isActive". It to mapped to a column by name "is_active" with data type as bit.
@Column(name = "is_active")
private boolean isActive;
But when ever I try to save isActive attribute of the object, I get an error:
column "is_active" is of type bit but expression is of type character
varying Hint: You will need to rewrite or cast the expression.
How do I store the values the values of isActive? I want to store "1" in the database when value of "isActive" is true and "0" when "isActive" is false.
Thank you!
booleantype? Abitis something different then abooleanYou are not using anintegerin Java eitherboolean"