I have a solution that I’m developing - started using 2.0, but have moved to 2.1b3 as I needed some of new enhancements. Solution data and repository are in a PostgreSQL database. Mac OS X 10.3.4.
Problem1: db seq not working in 2.1b3
When I create a new record in 2.1b3, in a table where the primary key is assigned a sequence value derived from the backend database (not a servoy seq), the insert fails with the following message:
java.sql.SQLException: ERROR: ExecInsert: Fail to add null value in not null attribute id
ERROR: ExecInsert: Fail to add null value in not null attribute id
What’s happening is that Servoy is not getting the next sequence value and passing it to the db when the record is created, instead the value is null which causes the constraint exception in PostgreSQL. Also, the backend sequence does not increment as it did before. I checked the properties for the various tables in Servoy to make sure that the pk’s were set to be db_seq and referred to the correct sequences in the backend and everything looked OK.
THIS WORKED FINE IN 2.0.
Problem 2) Booleans in backend database now cause data loading error in 2.1b4
When trying to troubleshoot 1) above I downloaded and installed 2.1b4 to see if the db_seq might have been fixed, and couldn’t get that far as I found an even more critical problem. When my solution loads the startup form, I get an error saying that the form data cannot be loaded. The details say:
Bad Integer t Bad Integer t.,
and my form shows no data records!
This is what I think is happening: The PostgreSQL table that is being loaded contains 2 fields of type boolean that contain values of ‘t’ or ‘f’ (usually t). Servoy doesn’t type these fields as boolean, but as integers. These fields aren’t used in my Servoy solution - they are used in backend trigger functions that handle certain types of maintenance tasks. Since I didn’t (and still don’t) access these fields in any form before, I never had any problem with the mistyping. Now I have them with 2.1b4. Actually, it would be nice if Servoy could handle SQL boolean data types, or at minimum go back to how things used to work. Can this be fixed?
Thanks!