Servoy 7.4.x and JSONB column types in PgSQL 9.5

Questions and answers regarding general SQL and backend databases

Servoy 7.4.x and JSONB column types in PgSQL 9.5

Postby Bonkie » Thu Sep 01, 2016 2:04 pm

Hi,

At this moment i'm doing some tests with PgSQL and Servoy with the column type JSONB so we can search trough json objects which are stored within our database.
This works like a charm but now i'm running into an issue when I try to save my foundset back to the database containing this information.

I've created an record in pgAdmin with an plain insert statement such as:

Code: Select all
INSERT INTO json.test_table(id,data) VALUES(1,'{"name":"Rick", "phone":"+31000000000"}');


And that works ofcourse since its just plain SQL, but when I try to update anything using Servoy I get this error:

Code: Select all
Can't save form data
> com.servoy.j2db.dataprocessing.DataException: ERROR: column "data" is of type jsonb but expression is of type character varying
  Hint: You will need to rewrite or cast the expression.
  Position: 93


Does anyone have a clue how I (or Servoy) should cast this in the right way?

Thanks in advance!
Rick Bonkestoter
Certified Servoy 7 Developer

Direct ICT / ServoyCamp
User avatar
Bonkie
 
Posts: 68
Joined: Wed Jun 27, 2007 11:05 am
Location: Den Ham, The Netherlands

Return to SQL Databases

Who is online

Users browsing this forum: No registered users and 4 guests