Releases: tkaczmarzyk/specification-arg-resolver
Releases · tkaczmarzyk/specification-arg-resolver
v4.1.0
- 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
SpecificationArgumentResolveror locally for each@Specdefinition viaconfigattribute. - Please see
Character escaping supportsection of README.md for more details.
- Escaping can be configured globally via
v3.4.0
- 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
SpecificationArgumentResolveror locally for each@Specdefinition viaconfigattribute. - Please see
Character escaping supportsection of README.md for more details.
- Escaping can be configured globally via
v4.0.0
- 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,Datein 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
INNERand SAR 4.x will generateLEFTjoin 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
InIgnoreCaseandNotInIgnoreCase- developed by @cschierle 🚀 - added case insensitivity support to boolean parameter values - developed by @cschierle 🚀
v3.0.0
- added
InIgnoreCaseandNotInIgnoreCase- developed by @cschierle 🚀 - added case insensitivity support to boolean parameter values - developed by @cschierle 🚀
v3.2.2
- bumped commons-lang3 dependency version to 3.18.0 to avoid known security issues
v4.0.0-M2
v3.2.1
v4.0.0-M1
- 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,Datein 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
INNERand SAR 4.x will generateLEFTjoin on implicit join table queries. This is strictly related to Hibernate internals, not SAR-specific behaviour - Developed by @sourcloud 🚀
v3.2.0
- 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
Changelog:
- Optimized distinct query evaluation in join
- From now on, during join evaluation, the query is set as
distinctonly when the join is actually being evaluated. - Previously,
distinctwas 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:
and requests:
@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()); }
-
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=?
- r1 - no filtering
-
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=?;
- r1 - no filtering
-
- For example, previously for the following specification:
- From now on, during join evaluation, the query is set as