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
No mapping for attribute by name #139
Comments
Thanks for reporting. From your analytics it looks like it is a 'duplicate' of #118 on the |
Thanks for the quick response! I read the other thread, and you're
absolutely right - it seems like the same issue. Could you elaborate on why
the comment about testing is there? Does that code just break (tableModel
is set during tests) when tested, or could it actually cause problems
outside of that?
Do you think just naively storing the column name as another instance
variable could work?
…On 14 Feb 2018 19:02, "Sebastian J." ***@***.***> wrote:
Thanks for reporting. From your analytics it looks like it is a
'duplicate' of #118
<#118> on the v4.5.x
branch.
Will have a look
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#139 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB6nK7xTVC0xhQrG3uxSELM-u4gUWqHIks5tUy3RgaJpZM4SFnUe>
.
|
The comment re: testing was introduced for testing the Auditing support (#26). There is already a method to get the (overriden) attribute name for a given property - no need to store more if I remember correctly. Will try to have a look later. |
Hello, I seen that this bug is fixed in a branch (4.5.x) with Spring 4 dependencies, but we can't find any release with that fixes for Spring 4. Thank you very much. |
Version Please allow up to 2h to sync Maven Central |
Thank you for so quick response. PD: You are doing a great job. |
Expected Behavior
We've got a Spring repository test that looks like this:
and a setup that looks like
and a model like so
This test should pass, and did on version 4.4.1.
Actual Behavior
The test currently fails, with a
DynamoDBMapperException
with the message "ClientCredentials[clientId]: No mapping for attribute by name".We suspect it's because of a change to
getPropertyAttributeValue
inAbstractDynamoDBQueryCriteria
, where the following block has been added in between 4.4.1 and 4.5.4:tableModel.field
throws the exception, as theDynamoDBMapper
has a record only forClientId
, whereaspropertyName
isclientId
. This triggers aDynamoDBMapperException
because it cannot find the field.propertyName
is thehashKeyPropertyName
, which isclientId
. One of the constructor parameters is aDynamoDBEntityInformation
, which contains the methodgetOverriddenAttributeName(String propertyName)
that could be used to resolve the name, maybe?Steps to Reproduce the Problem
Specifications
The text was updated successfully, but these errors were encountered: