Skip to content

Commit 46261ab

Browse files
authored
AC0008 - Described the risk of not explicitly setting the DataPerCompany table object property (#59)
1 parent 43faac2 commit 46261ab

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

  • content/docs/analyzers/ApplicationCop

content/docs/analyzers/ApplicationCop/AC0008.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ title = 'DataPerCompany must be explicitly set on table objects (AC0008)'
33
linkTitle = 'AC0008'
44
+++
55

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.
78

89
Explicitly declaring this property ensures that the design intent is clear and documented in the code, preventing data isolation issues in multi-company environments.
910

0 commit comments

Comments
 (0)