You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/docs/analyzers/ApplicationCop/AC0008.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,8 @@ title = 'DataPerCompany must be explicitly set on table objects (AC0008)'
3
3
linkTitle = 'AC0008'
4
4
+++
5
5
6
-
In projects where company data isolation matters, table objects must explicitly define the DataPerCompany property. Relying on implicit defaults makes the data scope unclear and can lead to incorrect assumptions about whether data is shared across companies or stored per company.
6
+
The `DataPerCompany` property on `table` objects can be used to specify whether there should be a SQL table for each company or a single SQL table used by all companies.
7
+
The implicit default of the `DataPerCompany` property is `true`, which means that if the developer intended it to be `false` but forgets to set it and the solution is released, there is no proper way to resolve this with a future update, i.e., there is no way to decide which values and/or records are the ones that should be retained when changing from a `DataPerCompany = true` table to a `DataPerCompany = false` table.
7
8
8
9
Explicitly declaring this property ensures that the design intent is clear and documented in the code, preventing data isolation issues in multi-company environments.
0 commit comments