Skip to content

Commit

Permalink
Merge pull request #163 from LionnoiL/212-fix-400-error-for-get-adv-b…
Browse files Browse the repository at this point in the history
…y-category

fixed 400 error for adv by category
  • Loading branch information
KovalBohdan-0 authored Jun 23, 2024
2 parents 1365315 + a913bc9 commit a876369
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public Page<Advertisement> getByCategoryTypeCitiesAttributes(

Specification<Object> where = Specification.where((root, query, criteriaBuilder) -> {
List<Predicate> predicates = new ArrayList<>();
root.fetch("author");
root.join("author");

if (category != null) {
predicates.add(criteriaBuilder.equal(root.get("category"), category));
Expand Down

0 comments on commit a876369

Please sign in to comment.