2019-07-08 11-04-34
Leonardo Fernandes
Allow Ignore foreign keys to static entities defined in Library modules
Service Studio

Service Studio prevents creating foreign keys that reference a static entity defined in a Library module.

This makes sense for Protect and Delete rules, because the static entity defined in a Library module is not backed by any database tabe.

However, IMO nothing is preventing us from using a foreign key with Ignore rule. These foreign keys will not have any database constraints, and will just be syntactic sugar to their underlying type (Integer, Long Integer or Text) but with the additional type checking and suggestions we come to expect from Identifier types.

For example, it should be possible to define static entities that augment the capabilities of OutSystems UI by using this pattern, as described in https://medium.com/@leonardo-monteiro-fernandes/extending-static-entities-part-1-bec8b3b7631c

This would also allow values obtained from SOAP enumerates (which are mapped to non-persistent static entities) to be stored in database entities, without discarding the type information.

2020-02-04 07-58-31
Matthias Preuter

Good story on Medium; think this would make OS more consistent