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 }}
Repository navigation
[Bug]: SQL schema PIM tables do not match the multiplicities of the PIM model #412
I have verified that I am running the latest version of the SysML2.NET
I have searched open and closed issues to ensure it has not already been reported
Description
The PIM section of the schema (schema.generated.sql:268-512) differs from the normative PIM model (ptc/25-02-29, Systems-Modeling-API.xmi):
PIM property
Model
Schema
Project::name, CommitReference::name, Query::name
[1..1] (redefines Record::name)
nullable
Record::description
[1..1]
nullable on every table
Project::defaultBranch
[1..1]
nullable
Commit::previousCommits
unordered
commit_parent.ordinal, comment at :272 says ordered
Record::alias
[0..*]
missing
Record::resourceIdentifier
[0..1] on every Record
only on project
CommitReference::deleted is [1..1] in the model, which cannot hold for a live branch; the nullable column is kept, and the discrepancy belongs to the specification.
The §3 banner of schema.generated.sql states that the C# PIM DTOs carry "a multi-valued ordered PreviousCommit". The C# types say otherwise (isOrdered: false), in line with the model.
Expected: PIM tables enforce the PIM multiplicities.
Fix:
NOT NULL on project.name, branch.name, tag.name, query.name, project.default_branch_id, and description on every Record table. Correct the comment at :498.
Drop commit_parent.ordinal (or document it as non-normative) and correct the comment at :272.
Add resource_identifier and an alias table for every Record subclass (Project, Commit, Branch, Tag, Query, DataIdentity, DataVersion).
Steps to Reproduce
INSERT INTO sysml2.project (id) VALUES (gen_random_uuid()); is accepted with no name, no description and no default branch.
Activity