Skip to content

Support Deleting Many Relationships #58

Open

Description

@GregBrimble

Right now:

instance.relations = [instance, otherInstance]
await instanceRepo.save(instance)

instance.relations = [instance]
await instanceRepo.save(instance)

await instance.relations // [instance, otherInstance]

Activity

  1. added
    bug
    on Nov 19, 2019
  2. GregBrimble commented on Nov 19, 2019

    @GregBrimble
    MemberAuthor

    Some sort of array-like interface?

    type oneToManyType<T> =
      | T[]
      | {
          push(value: T): void
          pop(): T
          clear(): void
        }
      | AsyncGenerator<T>
  3. GregBrimble commented on Nov 19, 2019

    @GregBrimble
    MemberAuthor

    Add instanceRepo.delete(instance) method, and use that for some funky deletion stuff for these many relationship values.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions