This fixes a bug, that caused the $STRUCT.table.field$ filter syntax to
be broken for lookup fields. Struct was comparing the row-id of the
argument-column to the raw value of the referenced column at the
filtered lookup.
There were multiple options to fix this bug:
1. Add a new function to the AbstractBaseType() that return raw value by
default (this is the approach implemented by this commit)
2. Add a function to the lookup type only and use introspection to call
it if it exists.
3. Do not compare the values in the referenced columns, but compare only
the row-ids
The problem with approach 3: It is not possible to compare such
lookup-column to any other column except lookups and this is not what we
want.
Approaches 1 and 2 have different trade-offs on where additional
code/complexity is created. I decided for approach 1 because it is the
cleaner overall approach and we might want to use this functionality for future
types as well.
SPR-875
The filters coming from syntax should be grouped together in a subgroup
to that OR-filters cannot undo the filters on latest=1 etc.
Since we cannot know in the filter function whether there is already a
subgroup for us to use or which to use, the solution was to give the
correct subgroup to the filter function directly.
Instead of adding another parameter to the already long list of
parameters for that function, I have chosen to give the
QueryBuilderWhere a reference back to the original QueryBuilder.
Dropdowns are now back to being simple value pickers. To select data
from a different Schema the Lookup type was introduced. This makes the
code a bit simpler.
Users who used the Dropdown type to reference schemas will need to
reconfigure their schema to make use of the Lookup type instead.
The Lookup type now handles self references (fixes#171) and references
to page schemas correctly.