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
{{ message }}
This repository has been archived by the owner on Oct 14, 2024. It is now read-only.
The Findings API property assetsCount needs to contain an aggregated value of referenced AssetFindings to ensure data validty.
Proposed Solution
Increment or decrement related Finding model assetCount property when AssetFinding is added or removed. GORM Hooks can be used for this. A background job needs to be added to the server which recalculates this field to ensure that the summary is correct.
Alternatives Considered
The assetsCount can be a read-only field that is evaluated from the database directly. The caching should be somehow used (check how to do this) to avoid recalc on every db op.
Additional Context
@ramizpolic Provide more implementation details on how to address this properly.
The text was updated successfully, but these errors were encountered:
Thank you for your contribution! This issue has been automatically marked as stale because it has no recent activity in the last 60 days. It will be closed in 14 days, if no further activity occurs. If this issue is still relevant, please leave a comment to let us know, and the stale label will be automatically removed.
This issue has been marked stale for 14 days, and is now closed due to inactivity. If the issue is still relevant, please re-open this issue or file a new one. Thank you!
Problem Statement
The Findings API property
assetsCount
needs to contain an aggregated value of referenced AssetFindings to ensure data validty.Proposed Solution
Increment or decrement related Finding model
assetCount
property when AssetFinding is added or removed. GORM Hooks can be used for this. A background job needs to be added to the server which recalculates this field to ensure that the summary is correct.Alternatives Considered
The
assetsCount
can be aread-only
field that is evaluated from the database directly. The caching should be somehow used (check how to do this) to avoid recalc on every db op.Additional Context
@ramizpolic Provide more implementation details on how to address this properly.
The text was updated successfully, but these errors were encountered: