Hi,
Currently using 11 reactive, SQL Server DB
I created another catalog w/c holds the application's entity while User entity is in the Main Catalog.
Is there a way that I can reference the User identifier with entity from other catalog? If none, any suggestion so I can still apply some sort of referential integrity / constraints?
Thanks
Hi Elmer, here Read-Only Data Optimized - OutSystems is a good article about data sync. Dont get confused with the mobile pattern. Actually the same principle can be applied to your use case.
Best
Stefan
You can always add the user identifier as an attribute in your entity. If its added to your main entity, just consume in the other catalog
Hi @Elmer
You can refer below link for the same.
https://www.outsystems.com/forums/discussion/32977/import-entity-from-other-outsystems/
Hope it helps you.
Regards,
Vipin Yadav
as Anuj already mention you can reference Identifiers across databse catalogs. Although you are completly loosing the referential constraints capability. Eg. you have one table in your application with a reference to User Identifier and da Delete Rule of "Delete". That rule will never apply when you delete a user. In addition, when deploying an application into another database catalog with foreign keys in a different catalog and a rule other than "Ignore" will always give you warnings (that warnings basically say that those rules are not applied).
Whenever you join two tables across databases please keep in mind that you have reduced performance, esp. when the new database catalog is somewhere else located. You might take a look at the best practice sync patterns in the OutSystems documentation and sync the Users Table to your new application database catalog, then reference the synced table where you can use the referential constraints configured.
thanks Stefan
Right now, I'm actually referencing the Users Entity with Ignore Rule on Delete as it throws such warning, and true enough, it won't apply the constraints (even in DB side)
You mentioned of synching table, do you have any idea or reference document that I can read on?
Cheers,
Elmer
Thanks Stefan. Seems that is the only viable solution for now. Like replicating the actual source to a local category where my entities of the application module reside and use that replicated entity as the fk/pk relationship.