Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
This repository was archived by the owner on Oct 31, 2023. It is now read-only.

feat(core): one-to-many references #76

@plushdohn

Description

@plushdohn

The backend for this should be fairly straightforward (the $lookup aggregation operator already returns an array), the frontend is more involved as we need to essentially manage arrays in the forms for the first time.

The API would look something like:

fields: {
  categories: {
    type: "reference",
    collection: "categories",
    many: true
  }
}

The type should then be inferred just as it currently is for reference fields, but as an array. The include property should need no changes.

An appropriate example for this feature would be adding a comment section to our blog example, which would also highlight server actions and collection-level access control.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions