-
Notifications
You must be signed in to change notification settings - Fork 140
Spring-Data-Commons 1.13.1-RELEASE causes custom repo to not be called. #77
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
Comments
I've managed to work around this by doing the following: package com.foo.repository;
import com.foo.stuff.Foo;
import org.springframework.data.repository.CrudRepository;
public interface FooRepository extends CrudRepository<Foo, Long>, FooRepositoryCustom{
@Override
<X extends Foo> X save(X foo);
} Unfortunately, this means that I have to do this for all of my DynamoDB repositories that have methods that a custom Repository implementation overrides. This is also contrary to the Spring documentation which at least implies that the only methods that need to be declared in the custom repository interface are custom queries and the like. |
I also opened A JIRA ticket against EDIT: mental context switch between JIRA markup and Markdown caused Markdown errors |
Sadly the fix as per https://jira.spring.io/browse/DATACMNS-1008 doesn't work. Only the workaround does - Therefore this test fails right now :(
Issue still/again exists in |
I've spent a few hours on this bug and have tracked down the root cause, but am still searching for a workaround/solution.
spring-data-dynamoDB
version: 4.5.0Spring-data-commons
version: 1.13.1-RELEASEI have a base repository interface:
...and a custom repository interface:
... and a custom repository implementation:
... If I use this custom repository:
With
spring-data-dynamodb:4.2.3
usingspring-data-commons:1.11.4-RELEASE
, thefooRepo::save
call inFooService
would call thesave
method onFooRepositoryCustom
. withspring-data-dynamodb:4.5.0
andspring-data-commons:1.13.1-RELEASE
, it actually callsorg.socialsignin.spring.data.dynamodb.repository.support.SimpleDynamoDBCrudRepository::save
!I've tracked this down to this commit and a few other changes within
DefaultRepositoryInformation
and specifically, theparametersMatch
method.What I can't figure out is why exactly the
SimpleDynamoDBCrudRepository::save
method is overriding my custom repository.EDIT: Correct some Markdown
The text was updated successfully, but these errors were encountered: