Skip to content

When 'findBy' method is annotated with @EnableScan or on class level, and the method uses only hash key (and range key), the method still executes scan instead of query. There is only a check if the used fields are GSI, but no checks if all the fields are hash/range keys. #296

@diyan-gochev-at-ft-dot-com

Description

Expected Behavior

  1. If we have a method findA and A is a hash key
    or
  2. We have a method findAAndB and A is a hash kay and B is range-key

Query op should be executed.

Actual Behavior

Scan op has been executed.

Steps to Reproduce the Problem

Scenario 1.

  1. Define only hash-key, declare method findByA where A is a hash key;
    Scenario 2:
  2. Define hash key and range key, declare method findAAndB where A is a hash key and B is a range key;

There is only a check if the used fields are GSI, but no checks if all the fields are hash/range keys.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions