Skip to content

Conversation

mp911de
Copy link
Member

@mp911de mp911de commented Feb 18, 2020

We now support composition of Criteria objects to create a Criteria from one or more top-level criteria and to compose nested AND/OR Criteria objects:

Criteria.where("name").is("Foo")).and(
        Criteria.where("name").is("Bar").or("age").lessThan(49).or(
                Criteria.where("name").not("Bar").and("age").greaterThan(49))

Related ticket: #289.
Depends on spring-projects/spring-data-relational#193

@mp911de mp911de linked an issue Feb 18, 2020 that may be closed by this pull request
@mp911de mp911de added this to the 1.1 M4 (Neumann) milestone Feb 18, 2020
@mp911de mp911de added the type: enhancement A general enhancement label Feb 18, 2020
@mp911de mp911de requested a review from schauder February 18, 2020 08:36
We now support composition of Criteria objects to create a Criteria from one or more top-level criteria and to compose nested AND/OR Criteria objects:

Criteria.where("name").is("Foo")).and(Criteria.where("name").is("Bar").or("age")
				.lessThan(49).or(Criteria.where("name").not("Bar").and("age").greaterThan(49))
schauder pushed a commit that referenced this pull request Mar 10, 2020
We now support composition of Criteria objects to create a Criteria from one or more top-level criteria and to compose nested AND/OR Criteria objects:

Criteria.where("name").is("Foo")).and(Criteria.where("name").is("Bar").or("age")
				.lessThan(49).or(Criteria.where("name").not("Bar").and("age").greaterThan(49))

Original pull request: #307.
schauder added a commit that referenced this pull request Mar 10, 2020
Refactored DefaultDatabaseClientUnitTests in order to make the relevant differences in setup easier to spot.
Formatting and nullability annotations.

Original pull request: #307.
@schauder
Copy link
Contributor

This is polished and merged.

@schauder schauder closed this Mar 10, 2020
@mp911de mp911de deleted the issue/gh-289 branch March 10, 2020 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for Criteria composition
2 participants