Relation problem

Hello,

I have the following setup: a table links two records from another table (typical N:M, except that N and M are records of the same table) using “left” and “right” side. So the table has two fields “ID_left” and “ID_right”.

In order to be able to see all related data from the main table, I have adopted the Servoy technique from the log: There is one text fields that combines the two keys using

ID.toString().length + ‘.’ + ID + ‘;’

for both in one text field.

Now I have a functionality to “switch sides”. All that happens is that both IDs are exchanged. The problem now is this: I see all related data in a table view. Then I show a dialog with one of the entries. I hit “switch sides”. When data is saved the record disappears from the table and dialog view. If I look in the table I see that the calc was updated, so the record should show up. Currently only switching to design mode helps. Not even relaoding the records manually (controller.loadRecords()) solves the matter.

Maybe some kind of caching issue? The relation has a calculation on the left side (a string of the form %ID;%) and is set to LIKE pointing to my combined key.

I hope I made myself understandable… :lol:

I found the obviously one and only way to overcome the problem:

databaseManager.refreshRecordFromDatabase(foundset, -1);

But this has to be a little bug, anyway? :wink: