Skip to content

Creating a model without a _id? #1310

Closed
@rohitsodhia

Description

@rohitsodhia

Is it possible to create a model without a _id automatically created?

I'm looking to create an embedded model in another, and I don't want the subdocuments to have a _id key, as they already have other primary keys. As we unfortunately can't cast properties in embedded documents (i have a date in the subdocument), I want to use the embeds many functionality, but don't want to end up with a bunch of useless ids attached.

I looked at primaryKey, but that doesn't seem to do anything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions