Skip to content

Dependencies

Properties that trigger additional constraints when present.

Each key of dependencies is the name of a property. If the property is present, then the object must confirm to the associated dependency.

Constructors

Dependencies

constructor(dependencies: Map<String, Schema.Dependencies.DependencyConstraints>, factory: BsonFactory)

Types

DependencyConstraints

DependOnProperties

To be valid, a property requires, when it is present, that other properties are present as well.

DependOnSchema

To be valid, a property requires, when it is present, that the object confirms to additional constraints.

Properties

dependencies

Property dependencies declared in this object.

The keys are property names. If such a property is present, then the object must respect the additional dependency constraints.

See also

name

val name: String

The name of this constraint.

Functions

toString

override fun toString(): String

JSON representation of this constraint object.

writeTo

override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.