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

Datamodel - Cyclic relations on classes missing #107

Closed
sjib opened this issue Jan 26, 2024 · 6 comments
Closed

Datamodel - Cyclic relations on classes missing #107

sjib opened this issue Jan 26, 2024 · 6 comments
Assignees
Labels
bug Something isn't working datamodel Concerns the datamodel

Comments

@sjib
Copy link
Contributor

sjib commented Jan 26, 2024

The attribute and relation log_card.fk_main_structure and fk_next_special_building are missing in the datamodel.

!!@ comment = "Assoziation"
ASSOCIATION Stammkarte_HauptbauwerkAssoc =
HauptbauwerkRef -- {0..1} Stammkarte;
Stammkarte_HauptbauwerkAssocRef -- {0..*} Stammkarte;
END Stammkarte_HauptbauwerkAssoc;

!!@ comment = "Assoziation"
ASSOCIATION Stammkarte_Naechstes_SBWAssoc =
Naechstes_SBWRef -- {0..1} Stammkarte;
Stammkarte_Naechstes_SBWAssocRef -- {0..*} Stammkarte;
END Stammkarte_Naechstes_SBWAssoc;

@sjib sjib added bug Something isn't working datamodel Concerns the datamodel labels Jan 26, 2024
@sjib sjib self-assigned this Jan 26, 2024
@sjib
Copy link
Contributor Author

sjib commented Jan 26, 2024

Same with measuring_point.fk_reference_station

!!@ comment = "Assoziation"
ASSOCIATION Messstelle_ReferenzstelleAssoc =
ReferenzstelleRef -- {0..} Messstelle;
Messstelle_ReferenzstelleAssocRef -- {0..
} Messstelle;
END Messstelle_ReferenzstelleAssoc;

@sjib
Copy link
Contributor Author

sjib commented Jan 26, 2024

These are all relations on the class itself.
@ponceta @domi4484 Can they be treated like other relations or should there be an extra table xxx_hierachy?

Many years ago I implemented this on MS ACCESS like this. Is this still the way to go also with Postgres?

                'RE_MESSSTELLE_HIERARCHIE
                Print #1, "CREATE TABLE RE_MESSSTELLE_HIERARCHIE( OBJ_ID  Text(" & OBJ_IDLengthString & ") not null, FS_MESSSTELLE Text (" & OBJ_IDLengthString & "), FS_REFERENZSTELLE Text (" & OBJ_IDLengthString & "));"
                
                Print #1, "ALTER TABLE RE_MESSSTELLE_HIERARCHIE ADD CONSTRAINT medrel204 FOREIGN KEY (FS_MESSSTELLE) REFERENCES MESSSTELLE(OBJ_ID);"
                Print #1, "ALTER TABLE RE_MESSSTELLE_HIERARCHIE ADD CONSTRAINT medrel205 FOREIGN KEY (FS_REFERENZSTELLE) REFERENCES MESSSTELLE(OBJ_ID);"

@sjib sjib changed the title log_card.fk_main_structure and fk_next_special_building missing Datamodel - Cyclic relations on classes missing Jan 26, 2024
@sjib sjib removed their assignment Jan 26, 2024
@sjib
Copy link
Contributor Author

sjib commented Jan 26, 2024

Or is it enough to set DEREFERABLE?

see #98 (comment)

@ponceta
Copy link
Member

ponceta commented Feb 2, 2024

Not clear to me :

  • Missing from initial datamodel implementation -> @sjib
  • Missing from adaptation to tww -> @3nids
  • Out of project scope and new -> bugfixing ?

@sjib
Copy link
Contributor Author

sjib commented Feb 10, 2024

@ponceta It is "Missing from initial datamodel implementation" - pull request #158 added to solve this issue

@sjib sjib self-assigned this Feb 10, 2024
@sjib
Copy link
Contributor Author

sjib commented Mar 14, 2024

Solved with #158

@sjib sjib closed this as completed Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working datamodel Concerns the datamodel
Projects
None yet
Development

No branches or pull requests

2 participants