Skip to content

#1668 Fix subCriteria's not being updated #1670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 29, 2021

Conversation

slyoldfox
Copy link
Contributor

@slyoldfox slyoldfox commented Jan 27, 2021

  • You have read the Spring Data contribution guidelines.
  • There is a ticket in the bug tracker for the project in our issue tracker.
  • You use the code formatters provided here and have them applied to your changes. Don’t submit any formatting related changes.
  • You submit test cases (unit or integration tests) that back your changes.
  • You added yourself as author in the headers of the classes you touched. Amend the date range in the Apache license header if needed. For new types, add the license header (copy from another file and set the current year only).

@pivotal-issuemaster
Copy link

@slyoldfox Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

Copy link
Collaborator

@sothawo sothawo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this PR. It looks good, can you

  • check and tick off the marks in the PR template (adding your name etc)
  • sign the contributor's agreement
  • rebase you branch on master an force push

the I can merge this

Criteria.or()
.subCriteria( Criteria.where("birthDate") //
.between(LocalDate.of(1989, 11, 9), LocalDate.of(1990, 11, 9)) ) //
.subCriteria( Criteria.where( "createdDate").is(calendar.getTime()) ) //
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
.subCriteria( Criteria.where( "createdDate").is(calendar.getTime()) ) //
.subCriteria( Criteria.where( "createdDate").is(383745721653L) ) //

no need for the Calendar stuff here (I'd not use the old java.util date classes anyway, but always the classes from java.time).

@@ -109,6 +108,158 @@ void shouldMapNamesAndConvertValuesInCriteriaQuery() throws JSONException {
assertEquals(expected, queryString, false);
}

@Test
// DATAES-1668
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// DATAES-1668
// #1668

DATAES was when we were using Jira, now we just use the #NNN

}

@Test
// DATAES-1668
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// DATAES-1668
// #1668

@sothawo sothawo removed the status: waiting-for-triage An issue we've not yet triaged label Jan 28, 2021
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 28, 2021
@pivotal-issuemaster
Copy link

@slyoldfox Thank you for signing the Contributor License Agreement!

@slyoldfox
Copy link
Contributor Author

@sothawo Not a git wizard here - I hope I ticked off all the steps as required :-)

@sothawo sothawo linked an issue Jan 29, 2021 that may be closed by this pull request
@sothawo sothawo removed the status: waiting-for-triage An issue we've not yet triaged label Jan 29, 2021
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 29, 2021
@sothawo sothawo merged commit e6c6d34 into spring-projects:master Jan 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Writing a more complex CriteriaQuery
4 participants