Skip to content

DynamoDBRepositoryConfigExtension.java uses wrong DYNAMO_DB_MAPPER_CONFIG_REF value #79

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

Closed
joostlammers opened this issue Sep 27, 2016 · 4 comments

Comments

@joostlammers
Copy link

According to the XSD, the following attributes are supported on the repositories element:

<xsd:extension base="repository:repositories">
<xsd:attribute name="amazon-dynamodb-ref" type="amazonDynamoDBRef" use="optional"/>
<xsd:attribute name="dynamodb-mapper-config-ref" type="dynamoDBMapperConfigRef" use="optional"/>
<xsd:attribute name="dynamodb-operations-ref" type="dynamoDBOperationsRef" use="optional"/>
</xsd:extension>

In the DynamoDBRepositoryConfigExtension.java it appears to be looking for different attributes:

private static final String AMAZON_DYNAMODB_REF = "amazon-dynamodb-ref";
private static final String DYNAMO_DB_MAPPER_CONFIG_REF = "dynamoDBMapperConfig";
private static final String DYNAMO_DB_OPERATIONS_REF = "dynamoDBOperations";

causing my dynamodb-mapper-config-ref value to be ignored.

@shivarajan
Copy link

any updates on this?

@shivarajan
Copy link

Currently broken in snapshot,
This impl construct does not pickup the mapper config currently in git master snapshot unless fixed,

<dynamodb:repositories base-package="com.xyz.repositories"
dynamodb-mapper-config-ref="aws-dynamodb-mapper-config" amazon-dynamodb-ref="aws-dynamodb-client" />

I've tested by changing below lines:

private static final String DYNAMO_DB_MAPPER_CONFIG_REF = "dynamoDBMapperConfig";
private static final String DYNAMO_DB_OPERATIONS_REF = "dynamoDBOperations";
private static final String AMAZON_DYNAMODB_REF = "amazon-dynamodb-ref";

@https://github.com/michaellavelle/spring-data-dynamodb/blob/master/src/main/java/org/socialsignin/spring/data/dynamodb/repository/config/DynamoDBRepositoryConfigExtension.java

to,

private static final String DYNAMO_DB_MAPPER_CONFIG_REF = "dynamodb-mapper-config-ref";
private static final String DYNAMO_DB_OPERATIONS_REF = "dynamodb-operations-ref";
private static final String AMAZON_DYNAMODB_REF = "amazon-dynamodb-ref";

compiled, tested which seems to "work".

@suryavikas
Copy link

Do we plan to merge this onto master ?

@derjust
Copy link
Contributor

derjust commented Jan 19, 2018

Hi!
This was fixed some time ago in a fork of this project:
derjust@b8bd30f and went into the 5.0.1 release

michaellavelle pushed a commit that referenced this issue Jul 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants