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
Derived Queries [DATAJDBC-318] #541
Comments
Thomas Lang commented Just for your information, i am currently working on that issue |
James Clark commented Thomas Lang, are you still working on this?
If not, Jens Schauder, I don't suppose you would be available to give me some pointers so I can tackle it? |
James Clark commented Hi Jens Schauder, I have taken a crack at this...well a start. I was hoping you could give me some early feedback as to if it's the sort of thing you're after or if it's not up to scratch at all. I created a PR against my private fork here jamesclark92#1 |
Jens Schauder commented James Clark I'll take a look. I also happen to know that Thomas Lang is actually still working on this. |
Jens Schauder commented James Clark this looks really good. And a lot of stuff. The only mayor thing I noticed is that I'm considering to go through the |
Thomas Lang commented Dear James Clark, ... i´m sorry that i did not keep the information flow up to date with this issue. Sorry again for my delay and not keeping this up to date here. Jens Schauder What is your opinion on this? Kind regards |
Jens Schauder commented From my selfish perspective throwing the stuff from both of you together and creating a single PR would be best. |
Thomas Lang commented ... i have shortly reviewed James Clark code. There are some new/other snippets in it than in mine. James Clark Should we take your version or my version and work the others code into it? Currently i don´t know where to start from. Another important aspect is time management. I appreciate your suggestions :) |
Thomas Lang commented Hello Jens Schauder I have reviewed and checked James` code once again an i have difficulties to decide which things work out better:
Jens Schauder Would you mind taking a look into my version and then decide which way to go? Any suggestions/tipps are very welcome to me as i´m actually a bit confused what to do :) |
James Clark commented Hey Thomas, perhaps you can tell me what your features/functionality yours has that mine doesn't? Then I can incorporate them into mine... But I guess the best way would be for one of us to raise a PR to the others |
Jordan LEFEBURE commented Hello James Clark Thomas Lang, I'm currently working on a fork of Spring Data JDBC for a specific database engine which work with SQL queries. This feature is of course a great improvement for the project. I will test both PR and make a review if it can help |
Thomas Lang commented Dear James Clark, From my point of view, my code does the more or less the same as yours with some different approaches.
My main classes are: I hope this helps you? Please respond if you need further information. |
Jens Schauder commented Hi James Clark, could you provide a PR against https://github.com/spring-projects/spring-data-jdbc in order to make it clear that you want your changes to end up in the main repository? |
James Clark commented I am more than happy for you to use my changes! |
Mark Paluch commented We received recently a contribution to Spring Data R2DBC which brought query derivation. We're going to add query derivation based on the existing infrastructure as there's no pull request available for Spring Data JDBC |
lseeker commented Test with issue/DATAJDBC-318 branch, current code has problem with relations. If entity has relation( It will better PartTreeJdbcQueryUnitTests contains relations like SqlGeneratorUnitTests. Thanks. |
Jens Schauder commented Thanks for the pointer lseeker. We'll look into that |
Jens Schauder commented We now support query derivation as long as the constraints only use direct properties of the aggregate root or of embedded entities. Referenced entities (1:1 and 1:N) get loaded as usual, but must not be used for constraints |
Jens Schauder opened DATAJDBC-318 and commented
We should add support for derived queries, i.e query generation from property names.
The infrastructure for this is already provided by Spring Data Commons, so it should be not to difficult to implement.
Only supporting simple properties, i.e. properties directly owned by the aggregate root is fine as a first step.
For hints how to implement this consult the Spring Data Mongo source code and search for usage of
PartTree
which is the structure that results from parsing a method nameReferenced from: pull request #209
5 votes, 10 watchers
The text was updated successfully, but these errors were encountered: