What does the FetchMode property on a query do? I will appreciate if someone will be able to give me very precise answer.
I know only implication of this parameter. It matters when exist/notexist joined datasources on the query are forming a tree - not a chain. If the tree of datasources is quite complex then your query has a very good chance not to work if FetchMode is not set to One2One.
To my knowledge it is related somehow to the way the kernel stores query datasources.
So, my rule of thumb is the following: if a query datasources form tree-like structure, FetchMode must be set to One2One everywhere exist/notexist join is used.
query = new Query();
qbdsInventTable = query.addDataSource(tablenum(InventTable));
qbdsInventItemGroup = qbdsInventTable.addDataSource(tablenum(InventItemGroup));
qbdsInventModelGroup = qbdsInventTable.addDataSource(tablenum(InventModelGroup));