Skip to content

Log a warning when path is supplied on HASH storage #12

Description

@banker

IndexSchema.makeField currently has a silent TODO:

// src/schema/schema.ts:206
} else {
    // For HASH storage, path should always be null
    if (path !== null && path !== undefined) {
        // TODO: log a warning
    }
    field.path = null;
}

Users who set a JSON path on a HASH-storage field get their value silently dropped. A warning would surface the misconfiguration.

Acceptance criteria

  • Warn (via console.warn or a logger if one is introduced) when a non-empty path is supplied for a HASH-storage field.
  • Include the field name and the storage type in the warning.
  • Unit test covering the warning surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions