Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IFC-605 fix delete constraint to handle relationships on generics #4351

Merged
merged 2 commits into from
Sep 13, 2024

Conversation

ajtmccarty
Copy link
Contributor

@ajtmccarty ajtmccarty commented Sep 12, 2024

fixes #4207
IFC-605

updates the node delete constraint logic to correctly handle mandatory relationships defined on a generic schema

@github-actions github-actions bot added the group/backend Issue related to the backend (API Server, Git Agent) label Sep 12, 2024
self._dependency_graph[kind][relationship_type] = {}
self._dependency_graph[kind][relationship_type][relationship_identifier] = peer_kind
self._dependency_graph[kind][relationship_type] = defaultdict(set)
self._dependency_graph[kind][relationship_type][relationship_identifier].add(peer_kind)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if a mandatory relationship is defined on a generic, then there can be multiple peer kinds that use the same relationship identifier, so this data structure needs to be a set instead of a single item that can be overwritten

@ajtmccarty ajtmccarty marked this pull request as ready for review September 12, 2024 19:34
@ajtmccarty ajtmccarty requested a review from a team September 12, 2024 19:34
@ajtmccarty ajtmccarty merged commit b8ac2b3 into stable Sep 13, 2024
45 checks passed
@ajtmccarty ajtmccarty deleted the ajtm-09122024-generic-delete-constraint-IFC-605 branch September 13, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
group/backend Issue related to the backend (API Server, Git Agent)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants