Hi,
I am using Servoy 7.3.1 and Postgresql 9.3
I have a table that has a primary key, so the column that is the primary key is NOT NUL.
I created a view that has that column included and in Servoy I set it as row-identifier.
Servoy now complains :
Table "tablexx" has column "columnyy" which has row identity set but column allows null.
Make sure column data is never null.
But the “allow null” checkbox is not editable.
What to do ??? or just ignore the warning ??
Regards,
Hi Hans,
it’s been a while ago since I used views, but I think Servoy assumes the column can be empty.
This is strange as you are saying it’s the pk in the other table.
Anyway, can you try to put COALESCE around your rowid?
Thanks Marc,
I’ll try that, but I think the problem is more with Postgresql views.
Before I used Oracle and there the columns in a view also have a NotNull atribute.
It looks like Postgresql does not have that.
And I guess Servoy sets all columns in a Postgresql view to nullable.
And then if You set a column as row identifier You end up with this warning.
Maybe one of the Servoyans can comment on this ?
Regards,
Thanks Sebastian,
I looked at the response to your ticket from Servoy. It is “won’t fix”.
That makes sense because your case is about tables, for which the columns can be set tot null/not null.
For Postgresql views the columns can not be set to null/not null.
Regards,
Hans Nieuwenhuis:
That makes sense because your case is about tables, for which the columns can be set tot null/not null.
For Postgresql views the columns can not be set to null/not null.
Hello Hans, do you mean in Servoy or in the database?
Hello Sebastian,
Both.
In Postgresql You can not set a views column to null/not null and if a view contains table columns that are defined as not null in the table,
the view does not reflect this.
In servoy the columns from a Postgresql view are all shown as “null allowed” and that flag is not editable.
Regards,