Skip to content

Releases: tkaczmarzyk/specification-arg-resolver

v4.1.0

12 May 12:48

Choose a tag to compare

  • Added character escaping support for LIKE-based specifications. It allows to treat special characters (such as % and _) as literals during database searches - developed by @Nawrok 🚀
    • Escaping can be configured globally via SpecificationArgumentResolver or locally for each @Spec definition via config attribute.
    • Please see Character escaping support section of README.md for more details.

v3.4.0

12 May 12:47

Choose a tag to compare

  • Added character escaping support for LIKE-based specifications. It allows to treat special characters (such as % and _) as literals during database searches - developed by @Nawrok 🚀
    • Escaping can be configured globally via SpecificationArgumentResolver or locally for each @Spec definition via config attribute.
    • Please see Character escaping support section of README.md for more details.

v4.0.0

26 Nov 10:21

Choose a tag to compare

  • Build integrated with Spring Boot 4 (and related Hibernate version). This version updates to spring-boot-dependencies-4.0.0 and deals with breaking changes from the upstream dependencies.
  • If you need a release compatible with Spring Boot 3.x - please select the latest 3.x version of specification-arg-resolver
  • BREAKING CHANGE: Removed support for Calendar, Date in favour of java.time API (JPA 3.2)
  • BREAKING CHANGE: please be aware that new version of Hibernate may generate different queries than the previous version. In context of this library, this is noticable when generating joins. For the same set of annotations and the same request, SAR 3.x will generate INNER and SAR 4.x will generate LEFT join on implicit join table queries. This is strictly related to Hibernate internals, not SAR-specific behaviour
  • Spring Boot 4 support developed mainly by @sourcloud 🚀 with review and additional fixes from @jradlica and @tkaczmarzyk
  • added support for extended interfaces when generating OpenAPI docs. Developed by @gibbz00 🚀
  • bumped dependency versions
  • added InIgnoreCase and NotInIgnoreCase - developed by @cschierle 🚀
  • added case insensitivity support to boolean parameter values - developed by @cschierle 🚀

v3.0.0

26 Nov 10:20

Choose a tag to compare

  • added InIgnoreCase and NotInIgnoreCase - developed by @cschierle 🚀
  • added case insensitivity support to boolean parameter values - developed by @cschierle 🚀

v3.2.2

09 Oct 14:51

Choose a tag to compare

  • bumped commons-lang3 dependency version to 3.18.0 to avoid known security issues

v4.0.0-M2

15 Sep 15:15

Choose a tag to compare

  • added support for extended interfaces when generating OpenAPI docs. Developed by @gibbz00 🚀
  • bumped dependency versions

v3.2.1

15 Sep 15:21

Choose a tag to compare

  • added support for extended interfaces when generating OpenAPI docs. Developed by @gibbz00 🚀
  • bumped dependency versions

v4.0.0-M1

25 Aug 15:08

Choose a tag to compare

  • Build integrated with Spring Boot 4 M1. Spring Boot 4 will be released in November 2005 and will update to Hibernate 7 and JPA 3.2. This PR updates to spring-boot-4.0.0-M1 and deals with breaking changes from the upstream dependencies.
  • If you need a stable release and/or Spring Boot 3.x compatible - please select the latest 3.x version of specification-arg-resolver
  • BREAKING CHANGE: Removed support for Calendar, Date in favour of java.time API (JPA 3.2)
  • BREAKING CHANGE: please be aware that new version of Hibernate may generate different queries than the previous version. In context of this library, this is noticable when generating joins. For the same set of annotations and the same request, SAR 3.x will generate INNER and SAR 4.x will generate LEFT join on implicit join table queries. This is strictly related to Hibernate internals, not SAR-specific behaviour
  • Developed by @sourcloud 🚀

v3.2.0

25 Aug 15:06

Choose a tag to compare

  • BREAKING CHANGE: Fixed case-insensitive specifications (EqualIgnoreCase, NotEqualIgnoreCase, LikeIgnoreCase, NotLikeIgnoreCase, StartingWithIgnoreCase, EndingWithIgnoreCase) to use database UPPER() function for both sides of comparison
    • This fixes incorrect query results when database and application use different locale settings or handle special characters differently (e.g., German ß character)
    • Please see Case Insensitive Support section of README.md for more details.
  • Developed by @jradlica 🚀

v3.1.1

28 Feb 11:50

Choose a tag to compare

Changelog:

  • Optimized distinct query evaluation in join
    • From now on, during join evaluation, the query is set as distinct only when the join is actually being evaluated.
    • Previously, distinct was set (depending on the config) unconditionally (even when the join was not evaluated), which could lead to performance issues.
      • For example, previously for the following specification:
        @RequestMapping("/join-distinct/customers/optionalParams")
        public Object joinCountSpecificationOptionalParams(
                @Join(path = "badges", alias = "b", type = LEFT)
                @And({
                        @Spec(path = "b.badgeType", params = "badge", spec = NotEqual.class),
                        @Spec(path = "lastName", spec = Equal.class)
                }) Specification<Customer> spec) {
        
            return customerRepository.findAll(spec).stream()
                    .map(CustomerDto::from)
                    .collect(toList());
        }
        and requests:
        • r1: GET /join-distinct-customers/optionalParams?page=1&size=1 - no filtering

        • r2: GET /join-distinct-customers/optionalParams/?page=1&size=1&lastName=Simpson - filtering on non-joined columns

        • following queries were previously generated:

          • r1 - no filtering
            select distinct c1_0.id,c1_0.street,... from customer c1_0 offset ? rows fetch first ? rows only
            select distinct count(distinct c1_0.id) from customer c1_0
          • r2 - filtering on non-joined columns
            select distinct c1_0.id,c1_0.street,... from customer c1_0 where c1_0.last_name=? offset ? rows fetch first ? rows only,
            select distinct count(distinct c1_0.id) from customer c1_0 where c1_0.last_name=?
        • from now, these queries are generated:

          • r1 - no filtering
            select c1_0.id,c1_0.street, ... from customer c1_0 offset ? rows fetch first ? rows only;
            select count(c1_0.id) from customer c1_0;
          • r2 - filtering on non-joined columns
            select c1_0.id,c1_0.street, ... from customer c1_0 where c1_0.last_name=? offset ? rows fetch first ? rows only;
            select count(c1_0.id) from customer c1_0 where c1_0.last_name=?;