Add a collate definition attribute on aggregate join
536
Views
5
Comments
New
Aggregates & Queries

A collate definition attribute for each table/entity in the join will be useful, so as not to force the use of SQL Advanced and to reduce the risks/chance of errors in the development.

By default, the collates will come with what is in the bases of origin of the tables, so that they can then be changed according to the need.

We have a scenario in which we make joins between tables with different bases and one of them has the SQL_General_CI_AS collate while the other uses SQL_General_CP850_CI_AS. This shows a warning in the column of the join involved, it allows publishing but incurs a runtime error.


I thing something in this position:

That's a great idea. Instead of switching to an SQL query and worsening performance, it would be way easy to allow for collage on the join conditions.

Hi,

Aggregates are for the 80% of use cases, and keep it simple to fast query the database. Advanced SQL is for the other 20% of use cases that are less common or complex. Would you consider your case to be that commonly used that it should be implemented in an aggregate?

Regards,

Daniel

Hi Daniel,

I consider that the purpose of OutSystems is to make development more agile, mitigate common errors and allow developers who are not as experienced with SQL to resolve cases like this directly in the aggregate.
How commonly it is used will depend on each scenario (and not just ours).

The objective (personal opinion): developers with less knowledge of SQL can make mistakes in queries and have greater difficulty solving cases like this.

This is what happened to us, the developer didn't know how to solve it via SQL and so a simple topic lasting a few minutes took a proportion of hours, as it took help from someone with more knowledge in SQL to convert the aggregates involved to SQL Advanced in order to be able to implement this config.

Hi,

All the reasons why aggregates exists.

 I only tried to explain OutSystems point of view on what they expect to be done in aggregates and what by advanced SQL. Not so much my own point of view although I do understand that it is hard and costly to implement each and every use case as a feature of aggregates, without ending up in a complicated experience that then will be error prown as the advanced SQL editor can be.


Regards,

Daniel

No problem.

I understand your POV.
I did the same too.  :)

Regards.