External table with composite keys

External table with composite keys

  

In my project i have to connect to external tables with more than one keys (composite keys). However, Outsystem only allows one column primary key. So, my team create a hand-made key by concatenate the composite key columns. So there is an Identifier type for the new table. 

I am not happy with this tricky. Imagine if the legacy system has so many tables with composite keys, factoring with the number of records of each table. It will be a nightmare just to create the new pk for outsystem.

And i believe that outsystem experts have anticipate this issue. So, my question is what is the best practise to integrate the legacy non-outsystem composite key tables into the outsystems? Thank you.

Regards,

A

You don't have to create concatenated composite primary key.

Just implement your own server-side logic for Create<Entity>, CreateOrUpdate<Entity>, Update<Entity>, Delete<Entity>, and optionally Get<Entity> and Get<Entity>ForUpdate.

Scaffolding might not create save button and logic flow, though...

Solution

Hi!

You can use unique indexes to implement a composite key.

Check out this topic.

Cheers,

Jaime

Solution