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

To Many Relations Seem Too Naive #24

Open
seandenigris opened this issue May 29, 2022 · 0 comments
Open

To Many Relations Seem Too Naive #24

seandenigris opened this issue May 29, 2022 · 0 comments

Comments

@seandenigris
Copy link
Owner

The current implementation simply swaps out the collection. But what if the collection is virtual? We'd like to capture requests in the memento to add or remove and then play them on the object when the form is saved.

Currently, when a cached memento is committed, the work is done here:

Object>>write: anObject using: aDescription
   "This hook is needed so that e.g. mementos and adaptive models can implement their own behavior. All other entry points e.g. MADescription>>#read: should come through here"

   aDescription accessor write: anObject to: self

This won't work for this to-many proposal, which would have to delegate back to the description. MADescription already has an analogous method:

write: anObject to: aModel
	^ aModel write: anObject using: self
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