Skip to content

Introduced queryLookupStrategy to @EnableJdbcRepositories. #1187

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

Conversation

DiegoKrupitza
Copy link
Contributor

Added the missing functionality that is found in the documentation of spring-data-jdbc, but was not present in the code as functionality. Users can not choose between various QueryLookupStrategies.

The implementation is based on the already existing design of spring-data-jpa.

Closes #1043

  • You have read the Spring Data contribution guidelines.
  • 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).

Added the missing functionality that is found in the documentation of spring-data-jdbc, but was not present in the code as functionality. Users can not choose between various QueryLookupStrategies.

Closes spring-projects#1043
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 24, 2022
@DiegoKrupitza DiegoKrupitza changed the title Introduced queryLookupStrategy to EnableJdbcRepositories. Introduced queryLookupStrategy to @EnableJdbcRepositories. Feb 24, 2022
@schauder
Copy link
Contributor

schauder commented Mar 1, 2022

When I run this with ./mvnw clean verify -Pall-dbs it fails with an exception because it can't find the appropriate script files for setting up a database.

@DiegoKrupitza
Copy link
Contributor Author

When I run this with ./mvnw clean verify -Pall-dbs it fails with an exception because it can't find the appropriate script files for setting up a database.

Ok I have to take a look at this in more detail. I only used mvn clean test to run tests.

I can't tell when I manage to find time to resolve this error, but I hope in the next days I find some time for it.
@schauder

@DiegoKrupitza
Copy link
Contributor Author

@schauder This should be fixed now.
Unfortunately I can not run ./mvnw clean verify -Pall-dbs since on M1 the performance of some containers is so slow that it took for mysql alone 20min (on a brand new M1 Pro 32gb). Until db2 everything works fine but after db2 the performance is so bad that I can't verify if the remaining dbs db2, oracle & mssql work as intended.
This sql create scripts should be correct but I can't verify local. Would be nice if you could run it at your workstation?

schauder pushed a commit that referenced this pull request Mar 7, 2022
Added the missing functionality that is found in the documentation of spring-data-jdbc, but was not present in the code as functionality. Users can not choose between various QueryLookupStrategies.

Closes #1043
Original pull request #1187
schauder added a commit that referenced this pull request Mar 7, 2022
Run tests only for a single database since it is actually not testing anything database related.

Formatting.

Original pull request #1187
See #1043
schauder pushed a commit that referenced this pull request Mar 7, 2022
Added the missing functionality that is found in the documentation of spring-data-jdbc, but was not present in the code as functionality. Users can not choose between various QueryLookupStrategies.

Closes #1043
Original pull request #1187
schauder added a commit that referenced this pull request Mar 7, 2022
Run tests only for a single database since it is actually not testing anything database related.

Formatting.

Original pull request #1187
See #1043
@schauder
Copy link
Contributor

schauder commented Mar 7, 2022

Thanks, that's polished and merged.

I changed the test a little by renaming it and removing the "integration" part of the name.
This way it doesn't get executed against all the databases, which probably was your intention in the first place.

@schauder schauder closed this Mar 7, 2022
@DiegoKrupitza
Copy link
Contributor Author

This way it doesn't get executed against all the databases, which probably was your intention in the first place

Ok thank you! I did not know that the Integration keyword exec it on all dbs. Are there more special tests "keywords" in spring-data-jdbc that I should be aware of? (e.g. a list somewhere where I can read up on this?)

@schauder

@schauder
Copy link
Contributor

No, no keywords. But there is TestDatabaseFeatures and friends for making tests only execute for databases having certain features. If you haven't seen that you might want to take a look.

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.

Create support for QueryLookupStrategy in @EnableJdbcRepositories
3 participants