Error in Aggregate with External Database

Error in Aggregate with External Database

  

Team,

I am trying to get the data using multiple entities in my application. When I try to join 2 entities, I get below error. One of my entity belongs to an external database which I have referenced through an extension.

Invalid Aggregate

The 'GetDailyLogs' Aggregate cannot join data from multiple databases. Change it to only use entities from a single database.


What is the solution to Aggregate in this case.

Shashank...

Hello Shashank.

There is no solution for this aggregate.

You are trying to join entities from different databases inside an OutSystems module using an Aggregate. This is not allowed (only if they were linked servers and even so, this is not recommended for performance reasons).

So, if you need to join, you will have to do it through logic, I fear.

(afaik)

Cheers.

Thanks Eduardo.

I also don't think joining through logic will be a good idea. Do you think I should create an entity in my database and Sync it through the External Database? The data volume is not that huge.

Shashank

Yes.

This is also a good idea.
You only have to decide the interval for the synchronization, that will depend on the type of information you have in there, the frequency of update of this data externaly and the needs of your own application.

There is a master class on archtecture in the Learn area that talks about some strategies for this type of integration.

Cheers.

Cool, thanks for the help Eduardo.


Shashank...