Why type casts should be avoided inside an aggregate?

Hello community!

I was reading the Outsystems platform best practices and saw that type casts should be avoided inside an aggregate. After making a quick search in the forum, i couldn't find a post related to this. So, my question is why should this situation be avoided? Performance?

Thank you in advance,

Rafael Valente


Hi Rafael,

The type casts are not native to the database and therefore the type casts are executed on the server-side (or client-side on mobile).

For some actions it will throw an error and others will result in a degrading performance.

Hope this is what you were looking for.

Kind regards,

Remco Dekkinga