spring-data-relational icon indicating copy to clipboard operation
spring-data-relational copied to clipboard

GH-1006 included QueryMappingConfiguration for all part tree queries

Open mipo256 opened this issue 1 year ago • 6 comments

Solving #1006 issue

To ease the review - actually, we already had the QueryMappingConfiguration applied for PartTree queries, but only for those that are declared in the repository and execute via PartTreeJdbcQuery#execute. For the predefined methods, that resolve into SimpleJdbcRepository methods we did not have QueryMappingConfiguration applied. So I've just covered this gap and added some tests to verify the expected behavior.

PS: For StringBasedJdbcQuery no changes required.

mipo256 avatar Sep 20 '24 07:09 mipo256

Resolved the conflict after Iterable --> List return type change for DefaultDataAccessStrategy. Kind reminder for the review @schauder :)

mipo256 avatar Oct 01 '24 16:10 mipo256

This PR fails DependencyTests.acrossModules. Could you please fix that?

schauder avatar Oct 02 '24 12:10 schauder

@schauder It actually is a bit strange that we have the failure in archunit test for cycles between modules, since only spring-data-jdbc module was affected. I'll give it a look and report below.

mipo256 avatar Oct 02 '24 14:10 mipo256

There are components (e.g. repository, mapping that exist in various modules. You get circles among these when you have a dependency in one direction in one module (possibly relational or commons) but in the opposite direction in another module (e.g. jdbc)

schauder avatar Oct 02 '24 14:10 schauder

@schauder so, the dependency error was fixed. The solution was to move QueryMappingConfiguration from:

package org.springframework.data.jdbc.repository;

to

package org.springframework.data.jdbc.core.convert;

It seems to make sense, since the QueryMappingConfiguration is really a part of the core conversion mechanism, not really the repository package.

What are your thoughts on this? @schauder

mipo256 avatar Oct 19 '24 11:10 mipo256

I updated our labels as this change is a breaking one by moving public types around.

mp911de avatar Oct 21 '24 07:10 mp911de

This PR currently does not compile and a naive rebase doesn't work either. Could you take a look @mipo256 please.

schauder avatar Mar 14 '25 13:03 schauder

Sure, I would handle it @schauder. Will let you know once it is fixed.

mipo256 avatar Mar 14 '25 13:03 mipo256

That is done @schauder

mipo256 avatar Mar 16 '25 19:03 mipo256

While it does compile a ./mvnw clean verify results in test failures. Please fix those.

schauder avatar Mar 17 '25 15:03 schauder

Thank you for pointing this out, that is fixed @schauder

mipo256 avatar Mar 17 '25 18:03 mipo256

Thanks, that's merged.

schauder avatar May 15 '25 12:05 schauder