Feature Request: Query Entity should return dataset with cdts

Certified Lead Developer

When a query is performed the response is a dataset which contains a dictionary. The issue is that the dictionary does not have the proper type casting for the attributes (they are just any types). This means that anytime a comparison has to be done, or a wherecontains is used we must first convert the result of the dataset into a proper data type. 

Side note, can we just make wherecontains perform basic type casting.

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Lead Developer

    The issue with type casting query results automatically is that with the ability to set a specific subset of columns to be returned, this would cause a cluttery mess when you only need one column from a query for instance.  Of course there's nothing keeping you from type-casting the results yourself in your Query Entity expression rules against your commonly-used Tables/CDTs.

    I think a stronger general-level approach would be to have a!queryEntity return a datasubset where the data element contains an array of Map instead of an array of Dictionary.  AFAIK this would be generally back-compatible with most (or all) use cases, and also solve a lot of the nitpicky issues caused by vaguely-typed dictionaries.

Reply
  • 0
    Certified Lead Developer

    The issue with type casting query results automatically is that with the ability to set a specific subset of columns to be returned, this would cause a cluttery mess when you only need one column from a query for instance.  Of course there's nothing keeping you from type-casting the results yourself in your Query Entity expression rules against your commonly-used Tables/CDTs.

    I think a stronger general-level approach would be to have a!queryEntity return a datasubset where the data element contains an array of Map instead of an array of Dictionary.  AFAIK this would be generally back-compatible with most (or all) use cases, and also solve a lot of the nitpicky issues caused by vaguely-typed dictionaries.

Children
No Data