-
Notifications
You must be signed in to change notification settings - Fork 142
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
Chore: Remove composition of many for Genres #427
Conversation
|
1 similar comment
|
Did the approach with the projection not work out? I'd prefer if we could keep the composition on db-level. |
What is the purpose of this composition. If we decide that the |
Maintaining the integrity of the hierarchy and avoiding gaps, by ensuring deep deletes. I think from a conceptual level on database the hierarchy is a large document. How the document is exposed via draft to users is a different question I think. So I think we should be able to expose individual nodes of the hierarchy as individual documents by excluding the composition on service-level. |
or could we annotate it with |
No, this is not supported. |
It works as expected. I think the question is more about the use case. If I get it correctly, we don't want to delete a Genre, we will leave this scenario just for reading. For modifications we want to introduce two more entities to cover Vincent's examples. One as a composition of many child for Books (like a table of contents with chapters) and another one for modifying similar to Genres but without any relationships to it from another entities. |
Okay I still think it makes sense for scenarios where you want to enable editing of such hierarchies with drafts for individual nodes. If we however anyway won't use Genres as an example for write I don't see why we should remove the Composition that we had all the time. It makes sense from a modelling perspective. BTW: Why not use Genres as an example for write with drafts for individual nodes? It would be a good fit from my perspective with the exclusion of the composition on service-level. |
Decision regarding modeling of entity Genres : sap.common.CodeList {
key ID : UUID;
parent : Association to Genres;
children : Composition of many Genres on children.parent = $self;
} admin-service.cds @odata.draft.enabled
entity GenreHierarchy as projection on my.Genres excluding {children}; Currently we are choosing to have a Depending on the relationships among the data, there are several possible scenarios:
|
No description provided.