google / android-fhir

The Android FHIR SDK is a set of Kotlin libraries for building offline-capable, mobile-first healthcare applications using the HL7® FHIR® standard on Android.
https://google.github.io/android-fhir/
Apache License 2.0
458 stars 238 forks source link

Fixed the db query to get LocalChangeResourceReferenceEntity. #2497

Closed aditya-07 closed 1 month ago

aditya-07 commented 1 month ago

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2495

Description Issue: As pointed by @LZRS in the #2495 description , The sql query in the LocalChangeDao.getReferencesForLocalChangesshould use IN operator instead of = operator to fetch all LocalChangeResourceReferenceEntity for the passed LocalChange ids.

Changes:

  1. Updated sql query to use IN.
  2. Added test to check the usage of LocalChangeDao.getReferencesForLocalChanges with single and multiple LocalChange .

Alternative(s) considered Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type Choose one: Bug fix

Screenshots (if applicable)

Checklist