diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c5e4d1..df7238d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.0] - 2022-06-21 +### Fixed +- Fix `EloquentAdapter::filterByIds()` getting key name from query model instead of adapter model + ## [0.2.0-beta.6] - 2022-04-22 ### Changed - Add support for `doctrine/inflector:^2.0` @@ -74,6 +78,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed - Fix pagination next link appearing when it shouldn't +[0.2.0]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0...v0.2.0-beta.6 +[0.2.0-beta.6]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.6...v0.2.0-beta.5 [0.2.0-beta.5]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.5...v0.2.0-beta.4 [0.2.0-beta.4]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.4...v0.2.0-beta.3 [0.2.0-beta.3]: https://github.com/tobyzerner/json-api-server/compare/v0.2.0-beta.3...v0.2.0-beta.2 diff --git a/src/Adapter/EloquentAdapter.php b/src/Adapter/EloquentAdapter.php index 09709d5..1f52921 100644 --- a/src/Adapter/EloquentAdapter.php +++ b/src/Adapter/EloquentAdapter.php @@ -48,7 +48,7 @@ class EloquentAdapter implements AdapterInterface public function filterByIds($query, array $ids): void { - $query->whereIn($query->getModel()->getQualifiedKeyName(), $ids); + $query->whereIn($this->model->getQualifiedKeyName(), $ids); } public function filterByAttribute($query, Attribute $attribute, $value, string $operator = '='): void