You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 15, 2019. It is now read-only.
I tried playing around with your hibernate-postgres-jsonb. I'm using Spring-JPA and I have a field like this. @typedef(name = "jsonb", typeClass = JSONBUserType.class, parameters = { @parameter(name = JSONBUserType.CLASS,
value = "java.lang.String")}) @entity @table(name = "ENTITY")
class Entity{ @type(type = "jsonb")
private String label;
..
}
When I pass a json string as given below, it persists them.
entity.setLabel("{"label":"full name"}")
I was trying to test an invalid json and was expecting an error.
entity.setLabel("invalid json format");
But I see the above value getting persisted in label column in PostgreSQL db.I verified the datatype and the datatype is jsonb.
When I try Java jdbc standalone code to do the same, I get json validation error.
Do you have any idea?
The text was updated successfully, but these errors were encountered:
Hi Pires,
I tried playing around with your hibernate-postgres-jsonb. I'm using Spring-JPA and I have a field like this.
@typedef(name = "jsonb", typeClass = JSONBUserType.class, parameters = {
@parameter(name = JSONBUserType.CLASS,
value = "java.lang.String")})
@entity
@table(name = "ENTITY")
class Entity{
@type(type = "jsonb")
private String label;
..
}
When I pass a json string as given below, it persists them.
entity.setLabel("{"label":"full name"}")
I was trying to test an invalid json and was expecting an error.
entity.setLabel("invalid json format");
But I see the above value getting persisted in label column in PostgreSQL db.I verified the datatype and the datatype is jsonb.
When I try Java jdbc standalone code to do the same, I get json validation error.
Do you have any idea?
The text was updated successfully, but these errors were encountered: