dyna-record
    Preparing search index...

    Interface CreateRelationshipConditionError

    The error surface presented when a create condition names a single-valued relationship that is not a BelongsTo backed by a typed foreign key.

    Never written by hand: it is the type such a relationship key takes in a CreateCondition, so the compile error quotes its message.

    A new entity has no HasOne child yet, so only its parents can be guarded, and a parent is known at compile time only through a foreign key declared with its target type.

    // Customer declares @HasOne(() => ContactInformation, ...) contactInformation
    await Customer.create(
    { name: "Jane Doe", status: "active" },
    // Compile error naming this surface: a new Customer has no contact yet
    { condition: { contactInformation: { email: "jane@example.com" } } }
    );
    interface CreateRelationshipConditionError {
        __writeConditionError: "create guards only a BelongsTo relationship whose foreign key is declared with its target type, ForeignKey<Target> or NullableForeignKey<Target>";
    }
    Index

    Properties

    __writeConditionError: "create guards only a BelongsTo relationship whose foreign key is declared with its target type, ForeignKey<Target> or NullableForeignKey<Target>"