Skip to main content

cardinalityOf

Callable


  • How many entities a reference names: a reference carrying a path names a collection, and one without a path names a single entity.

    The rule is the path and nothing else, which is why this needs no shape table. A component is an entity the owning service resolves in its own right, so a chain of them addresses exactly one thing; a path addresses something inside an entity, which the owning service does not key, and nothing about the grammar can promise that names only one. A gid under a file is the concrete case: gids repeat across the source files feeding a merge, and one file can be loaded twice under different transforms.

    A service may well guarantee that a particular path shape yields at most one -- a layer name is unique within its file -- but that is the service's guarantee about its own data, not a property of the reference. Callers get a collection either way, so a service tightening or relaxing such a guarantee never changes a caller's shape.


    Parameters

    Returns EntityCardinality