Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Add support for composite types #314

@RobertCraigie

Description

@RobertCraigie

Problem

In 3.10 Prisma added support for embedded types, this looks like this in the schema

model User {
  id Int @id @default(autoincrement())
  name String
  photo Photo
}

type Photo {
  width  Int
  height Int
  data   Bytes
}

This is currently only supported for MongoDB although there are plans to add support for this to other database providers in the future.

Suggested solution

I have not looked into the API that Prisma provides for this yet but I imagine that this will be very similar to relational fields.

https://www.prisma.io/docs/concepts/components/prisma-client/composite-types

Metadata

Metadata

Assignees

No one assigned

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions