Skip to content

ManyToOne/TsMorph - nullable is always false #3447

@ml1nk

Description

@ml1nk

Describe the bug

75a6487

  @ManyToOne({ onDelete: 'cascade', onUpdateIntegrity: 'cascade' })
    parent!: IdentifiedReference<TreeNodeEntity> | null

prop.nullable is false even if there is no user defined default

which leads to:

ValidationError: Value for TreeNodeEntity.parent is required, 'null' found

Versions

Dependency Version
mikro-orm 5.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions