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

Support for Compositions #2

Open
gsvarovsky opened this issue Sep 30, 2022 · 0 comments
Open

Support for Compositions #2

gsvarovsky opened this issue Sep 30, 2022 · 0 comments

Comments

@gsvarovsky
Copy link
Member

Compositions. How do we mark an object property as a composition, so that deletes are cascaded?

Good question. If a relation is defined using a property attribute, perhaps this can be added as an argument, e.g.:

class Notebook {
// ...
 var notes: Note[]
}

class Note {
// ...
 @MeldField("notebookId", onDelete: .cascade)
 var notebook: Notebook
 var notebookId: String
}

Originally posted by @kkostov in m-ld/m-ld-spec#97 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant