Skip to content

Support ^ reverse / parent navigation in find and criteria #137

Description

@jtnelson

Tracks the Runway side of reverse / parent navigation. Parent feature:
cinchapi/concourse#781.

Summary

Let Runway find and criteria use reverse-navigation keys (^, ^key) so
application code can query records by their parents, for example
find(File.class, where("^.exchange.user.userId").EQUALS.value(me)).

Scope

  • Pass ^-keyed criteria through to the server unchanged; the server resolves
    them.
  • Treat a ^-keyed condition as database-resolvable.
  • Client-side parity: teach Record.matches and navigate to evaluate reverse
    hops so in-memory matching agrees with server find.
  • Gate behind a supportsReverseNavigation server-version check (mirroring
    supportsTransitiveNavigation), falling back to the existing
    find-then-collect idiom on older servers.
  • Optional stretch: an @Inverse(from, via) field annotation plus a
    linkedFrom(...) accessor that resolve a declared back-reference (compiling
    to the same primitive) for an ORM-ergonomic parent read site.

Acceptance Criteria

  • A find with a ^ or ^key criterion returns the correct records via
    the server.
  • matches() agrees with find() for reverse criteria.
  • The version gate degrades gracefully on servers without
    reverse-navigation support.
  • Tests cover bare ^, ^key, and a multi-hop reverse criterion (the
    my-files query) against Mockcourse and Runway.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No 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