I think I found a bug, but I am not sure. Might be found earlier but I never noticed before.
I have this view defined:
ViewARS VIEW(ARules)
PROJECT(ARS:ARuleID)
PROJECT(ARS:Sequence)
PROJECT(ARS:ObjectID)
JOIN(OBJ:OBJ_pkey,ARS:ObjectID)
PROJECT(OBJ:ObjectID)
PROJECT(OBJ:Naam)
PROJECT(OBJ:Nummer)
END
END
When I do a trace on a Set/Loop/Next there is this output in the trace:
SELECT A.ARuleID, A.KLANTID, A.Sequence, A.WERKWIJZEID, A.OBJECTID, B.ObjectID, B.KLANTID, B.NAAM, B.NUMMER, B.OBJECTSOORTID, B.MATERIAALSOORTID, B.RUIMTEID, B.MACHINECODE
FROM {oj dbo.ARules A LEFT OUTER JOIN dbo.Objecten B ON A.OBJECTID= B.ObjectID }
WHERE ...
To my surprise there are more fields in the generated SELECT statement then I defined in my view structure. Not all the fields of the tables are added but only the fields that are also present in a key defined in the dictionary.
For example I only have three fields of the table Objecten in my view structure. In the Select statement there are five more (B alias). And these five are used in one or more keys that I have in the dictionary. Same happens for the A alias.
Has anyone see this before? Or is this expected behaviour?
Clarion 11 build 13630
MS SQL