Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sec. Index: query with filter on an indexed field of a primary subtype always returns only 1 doc. #2590

Closed
islamaliev opened this issue May 6, 2024 · 0 comments · Fixed by #2594
Assignees
Labels
area/query Related to the query component bug Something isn't working
Milestone

Comments

@islamaliev
Copy link
Contributor

islamaliev commented May 6, 2024

schema:

type User {
  name: String
  age: Int @index
  devices: [Device]
} 

type Device {
  model: String 
  owner: User
}

Query:

query {
  Device(filter: {
    owner: {age: {_eq: 48}}
  }) {
    model
    owner {
      name
    }
  }
}

Here if a user with age 48 has more than 1 device, all of them should be returned with the same owner. At the moment only 1 device is returned.

Detected during testing of #2365

@islamaliev islamaliev added bug Something isn't working area/query Related to the query component labels May 6, 2024
@islamaliev islamaliev self-assigned this May 6, 2024
@fredcarle fredcarle added this to the DefraDB v0.12 milestone May 6, 2024
islamaliev added a commit that referenced this issue May 8, 2024
## Relevant issue(s)

Resolves #2590 and #2600

## Description

Make join fetch all secondary docs of a fetched-by-index primary doc.
shahzadlone pushed a commit that referenced this issue May 14, 2024
## Relevant issue(s)

Resolves #2590 and #2600

## Description

Make join fetch all secondary docs of a fetched-by-index primary doc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/query Related to the query component bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants