we have module A (Common CS) and module B (core cs)
from module A in one Entity we are referencing another Entity Identifier in Module B as a foreign key to create one relationship.
other than that, from module A common Cs we are using/refencing so many public elements in module B.
is this circular dependency negligible, since only one entity
or we should remove this?
what are all the side effects having these circular dependencies?
will it cause any problems when migrate apps from O11 to ODC?
@Priya Naveen : Any circular dependency between modules should be avoided, even if it’s just a single entity reference. Cyclic dependencies cause publishing issues and break architecture rules.
The correct fix is to create a separate Core Data module and move the shared entity there. Both modules A and B should depend on that new module, but must not depend on each other.
If you have already published the application to live or have data in those entities , you will loose data during this refactoring and you have to plan for migration of data.
There is a forge component "Refactor" (https://www.outsystems.com/forge/component-overview/496/refactor-o11) helps with data migration in this case.
Hello @Priya Naveen
No. Even if it’s just one entity, circular dependency between Module A and Module B is not good practice in OutSystems.
You can try to make another reference module to remove the circular dependency.
How the solution works:-
Create a new module, example name: Common.Reference
Move the shared entity (the one causing the circular dependency) into this new module.
Update dependencies:
Module A → references Common.Reference
Module B → references Common.Reference
A and B no longer reference each other, so the circular dependency is gone.
I am sharing some learning material for you. You can refer to these
https://www.outsystems.com/forums/discussion/79667/cyclic-reference/
https://success.outsystems.com/documentation/11/app_architecture/performance_best_practices_references/
https://learn.outsystems.com/training/journeys/refactoring-apps-414/refactoring-an-application/o11/730