Skip to content

replace associations mechanism #51

@lanej

Description

@lanej

is currently very clunky.

Instead of modeling associations as instance variables, they could simply be referred do as attributes. There would be a belongs_to and a has_many.

  • has_many: would likely require a block form argument yielding a scoped collection that would be stored in the attribute.
  • belongs_to: should be a simple as declaring the class and making cistern do the leg work.

Side effects:

  • aping objects would also print nested objects within. This would also force load any association not already loaded.
  • sideloading would become feasible from the model api.

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