Servoy relations go haywire?

I finally moved my development to 2.2 (rc1) and find that something is definitely wrong with relations.
For instance when I create a new record it shows related records on that record while the Foreign Key fields are NULL.
Also methods that check for null values in related fields pass the condition(!) and then give me an error that the field has a null value.
Also I get a PostgreSQL error when I trigger a calculation. I still have to dig into that one to see what is going on here.

Question to the dev team. Did you change things in respect to PostgreSQL maybe?

Some extra info about the ‘ghost’ related records when I create a new record.
They seem to show the very first record of the related tables. (although the FK is null).

And the PostgreSQL error I get is:

org.postgresql.util.PSQLException: Unknown Types value. Unknown Types value.

Digging deeper into this I also see that Servoy somehow insert null values in columns that have a default value defined on the table.
Inserting a record with 2 other tools does give me these default values.

PostgreSQL 7.4.2
pg74.215.jdbc2ee JDBC driver
Servoy Developer
Version R2 2.2rc1-build 319
Java version 1.4.2-38 (Mac OS X)

I am noting the same problems with relationships. I have tab panels that should have null sets that are showing hundreds of records. Not present in build 318 but is present in 319.

John McCann

Servoy Developer
Version R2 2.2rc1-build 319
Java version 1.4.2_07-b05 (Windows 2003)

I am using MS SQL Server.

JDM

I observe this:

I have a record that has ONE or ZERO related record by definiton. For that reason I only show that related record in browse mode, since there is only one I don’t need a table.

If I create a new record in the main table, I get to see the first record of the related table, which has nothing to do with the record I created. I suppose what happens is what you describe here: all records of the related table are shown, I just get to see the first one…

ROCLASI:
I finally moved my development to 2.2 (rc1) and find that something is definitely wrong with relations.
For instance when I create a new record it shows related records on that record while the Foreign Key fields are NULL.
Also methods that check for null values in related fields pass the condition(!) and then give me an error that the field has a null value.
Also I get a PostgreSQL error when I trigger a calculation. I still have to dig into that one to see what is going on here.

Question to the dev team. Did you change things in respect to PostgreSQL maybe?

Do you still note the problem of Servoy relations going haywire in version rc2? I still have a problem where servoy inappropriately shows related records in tab panels when the foreign keys are null. If I have one appropriatley matched foreign key it works properly. If I have no matching records then it displays all records with a null foriegn key. Not present in b3 but is present in rc1 AND rc2.

John McCann
Servoy Developer
Version R2 2.2
Java version 1.4.2_07-b05 (Windows 2003)

Yep, I still have the same issue with a solution I have. Like when I create a new record this record already relates to anything else that is in the related tables.
But when I create a new simple solution then this isn’t happening. So it’s not consistent it seems.
The previously mentioned solution does use transactions, FormInDialog, etc.
I haven’t had the time yet to see who the culprit is.

ROCLASI:
Yep, I still have the same issue with a solution I have. Like when I create a new record this record already relates to anything else that is in the related tables.
But when I create a new simple solution then this isn’t happening. So it’s not consistent it seems.
The previously mentioned solution does use transactions, FormInDialog, etc.
I haven’t had the time yet to see who the culprit is.

I also have trouble reproducing it in a simple solution but I am certain it is a Servoy glitch as it did not happen in builds prior to 319. I am not using transactions and still see the problem.

John McCann

I also have had relation bugs. Here’s a bug report and a way to reproduce it. Very screwy:

http://forum.servoy.com/viewtopic.php?t … f1bd0201e7

Bob,

Thanks for sending a sample solution. I hope the Servoy guys can find a fix prior to next release.

John McCann

I’m happy to email you the sample solution. Where shall I send it?

I found, with help of Patrick’s demo solution, a way to reproduce the problems I had with my solutions and 2.2 rc1/2.
See thread: http://forum.servoy.com/viewtopic.php?t=4109

It seems it’s related to the use of unrelated tabs but also record/listviews more then 1 tabview deep.

I am not using unrelated tabs. I have the problem when I display a listview form two tabs deep. This form should have not records on the list and instead it displays all records.

I am still running Beta2 [does not demonstrate this problem] and cannot upgrade to one of the release candidates till this problem is fixed.

John McCann

This issue is still present in RC3. I looked more closely at it and note I am actually 3 tab panels deep when I see the error.

Panel 1 : tableA related to tableA by the primary key
Panel2 : tableA related to table B by the primary key of A and a constant
Panel3: tableB related to table C by the primary key of A
[Panel3 displays the result in a list view]

The problem occurs when the constant in table A has no matching foreign key in table B.

Instead of seeing no result in the list view, I see all possible results. It is screwy in that the first time you display the tab it has an empty foundset and the second time and all subsequent times it displays all records.

Hopefully it can be adressed in the next release candidate.

John McCann

Same trouble here for some time, at least since the RC versions.

In my case.
When relation is three related tabpannels deep, and opening a form, on which the selected record has no related records it`s showing all records. Very tricky.

Can the servoyans please confirm if this is a bug?

Rene

Servoy Developer
Version R2 2.2rc3-build 321
Java version 1.5.0_01-b08 (Windows XP)

I’ve seen this behaviour - and the team is aware of the problem.

I belive it’s an open issue.

Thank you for confirming Bob.

Ill hope its solved soon.

Rene

Rene,

As a temporary work around you can test if the tab panel should have records in it OnShow and hide the tab panel if it should not be displaying records. I am sure a better solution will be forthcoming from the development team.

John McCan

You can also call controller.loadRecords(relationName) - and that will do it as well.

We are investigating this issue currently.