Skip to content

Support for HABTM #233

Description

@Startouf

Is it possible to add habtm (has and belongs to many) support ? Or maybe this is already supported in a different way ?

The use case is to avoid intermediate tables when it's not necessary, so we'd be able to write something like that

interface TagType {
  name: string;
}

const tagSchema = new Schema<TagType>({
  name: { type: String },
})

interface UserType {
  tags: entity.Key[]
}

const userSchema = new Schema<EventType>({
  teachers: { type: Schema.Types.Keys, ref: 'Tag' },
})

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions