This may be a nasty one:
Depending on the definition of the relation, we get incomplete sorts and even partial to complete “apparent” disparition of data.
When you sort a foundset by a related column, you may expect very strange behaviour depending on the definition of your relation:
A) Simple relation; relation: columnA = columnB
Foundset is “partly” sorted by random block size ?!?!?, if you are in table view, the first part of screen may seem to be sorted, but if you scroll down you soon encounter unsorted data.
B) Complex relation; relation: columnA = columnB and globals.constant4 != columnC
All the records for which columnC = null are simply wiped from the foundset by the sort action!
C) Complex relation; relation: columnA = columnB and globals.equalNull = columnC
The sort action renders an empty foundset!
While debugging we made the following constatations:
- When sorting, servoy asks only for an ordered list of pks, thus sparing bandwidth.
- When the relation uses null values in definition, pk are not rendered back to servoy. When servoy receives less pk than the number of records in the foundset to be sorted, it apparently ignores all records which pks are not returned, thus reducing, case B) or completely erasing case C) the current foundset.
- Case A) seems to be a completely different bug.
Can you please correct this bug before releasing 2.2.1 final?
As we are using several relations like case C), we first encounter this bug when clicking on a column header in a table view, thus magically loosing the current foundset.
Which is very disappointing for the end user who believes he/she lost the data until he/she quits and reload the solution.