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
GlobalSecondaryIndexes with projection creates the field with double quotation marks #59
Comments
@yegor256 please dispatch this issue |
@rbodoque I'm not sure I understand the problem. What do you expect to see there instead of
is equivalent to:
|
Hello @yegor256 sorry for the late response, Time ago that I'm not working with this. I think assumption is not correct I mean => print(x.toString()); for show you I've created this simple test https://github.com/rbodoque/-jacabitest.git the test is the method
If both were the same it will print FirstName twice but what is printing is "FirstName" I think this is because the current implementation is executing this code What the issue is causing it creates a projection but with the "FirstName" column instead of the FirstName column |
Hello
I have a json definition like that
As you can see in the Projection of the GlobalSecondaryIndexes there is one field "FirstName" that needs to be projected to the index.
When I create the table by maven and then query Dynamo for describe the table it returns:
As you can see the projection is created with double quotation marks
Projection: {ProjectionType: INCLUDE,NonKeyAttributes: ["FirstName"]}
I think the issue is in com.jcabi.dynamodb.core.Tables in the method
private Projection projection(final JsonObject json)
in the line 290 is doing
nonkeyattrs.add(nonkey.toString());
And this causes put the double quotation.
Maybe a solution could be change to something like
JsonString nonkeyStr = (JsonString)nonkey;
nonkeyattrs.add(nonkeyStr.getString());
thanks
Rafa
The text was updated successfully, but these errors were encountered: