Skip to content

To Many Relations Seem Too Naive #24

@seandenigris

Description

@seandenigris

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions