Compositions API HandleGetByQuery restricts where-clause when accessing DialogConfigParm table

Hello,

when setting up an HandleGetByQuery API method for fetching data from the DialogConfigParm table, the resulting query gets restricted by the object layer:

API method:

builder.AddMethod(Method.Define("common/configparms")
                    .HandleGetByQuery("DialogConfigParm")
                    .WithResultColumns("ConfigParm", "FullPath", "Value", "Enabled")
                    ...

Query restriction done by the object layer (it basically only returns the root nodes of the ConfigParms):

2020-09-08 14:54:12.6767 TRACE (ObjectLog ) : Loading strings from QER.CompositionApi, Version=8.1.0.0, Culture=neutral, PublicKeyToken=5d0660cde5b231fd|QER.CompositionApi.Properties.Strings. 
2020-09-08 14:54:12.6812 TRACE (ObjectLog ) : Loading strings from QER.Customizer, Version=8.1.0.0, Culture=neutral, PublicKeyToken=5d0660cde5b231fd|QER.Customizer.Properties.Strings. 
2020-09-08 14:54:12.6767 TRACE (ObjectLog ace16284-47ce-4c58-b6d0-b114c87530f4) : Classification risk: 0, fp: , hash: , already checked: False, tries: 0, last try: - ago, where clause: ((isnull(UID_ParentConfigparm, '') not in (select UID_ConfigParm from DialogConfigParm where 1=1))) 
2020-09-08 14:54:12.7276 DEBUG (ObjectLog ace16284-47ce-4c58-b6d0-b114c87530f4) : DialogConfigParm: Getting collection, load type: ForeignDisplays, ForeignDisplaysForAllColumns 
2020-09-08 14:54:12.7560 DEBUG (ObjectLog ace16284-47ce-4c58-b6d0-b114c87530f4) : 	Try to get data from cached queries or from source. 
2020-09-08 14:54:12.7878 TRACE (SqlLog ace16284-47ce-4c58-b6d0-b114c87530f4) : 	ClaimConnectionAsync - read write, _transaction == null 
2020-09-08 14:54:12.7878 TRACE (SqlLog ) : -- Connection 1 switched from Available to Working after comparison 
2020-09-08 14:54:12.7878 TRACE (SqlLog ) : --> existing connection 1 
2020-09-08 14:54:12.8081 DEBUG (SqlLog ace16284-47ce-4c58-b6d0-b114c87530f4) : 	(19 ms) - select * from (select ConfigParm, FullPath, Value, Enabled, UID_ConfigParm, xmarkedfordeletion from DialogConfigParm where (((isnull(UID_ParentConfigparm, '') not in (select UID_ConfigParm from DialogConfigParm where 1=1))))) as x ORDER BY FullPath OFFSET 0 ROWS FETCH NEXT 20 ROWS ONLY 

When using the HandleGet API method with the Query builder, no restrictions are made by the object layer. So my questions are basically:

a) Where does the restriction comes from? Does it come from the Customizer and whats the reason of that mechanism?

b) Why does it only get restricted when using the HandleGetByQuery method but not the query builder & fetching IEntities even though both are accessing the data via object layer?

c) Can we expect to have such an behavior on other tables as well? And is there any workaround when using the HandleGetByQuery method?

Thanks in advance! Best regards

Parents
  • Hello Daniel,

    DialogConfigParm is a hierarchical table. By default, only items underneath one parent are loaded. The parent can be specified in the ParentKey parameter.

    Alternatively, you can disable hierarchical data for your API method if you need the flat list. To do that, simply call DisableHierarchicalData() on your method definition.

    Regards

    Hanno

Reply
  • Hello Daniel,

    DialogConfigParm is a hierarchical table. By default, only items underneath one parent are loaded. The parent can be specified in the ParentKey parameter.

    Alternatively, you can disable hierarchical data for your API method if you need the flat list. To do that, simply call DisableHierarchicalData() on your method definition.

    Regards

    Hanno

Children
No Data