{"action":"closed","issue":{"url":"https://api.github.com/repos/aws/aws-sdk-java/issues/204","repository_url":"https://api.github.com/repos/aws/aws-sdk-java","labels_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/204/labels{/name}","comments_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/204/comments","events_url":"https://api.github.com/repos/aws/aws-sdk-java/issues/204/events","html_url":"https://github.com/aws/aws-sdk-java/issues/204","id":29559319,"number":204,"title":"Problem when querying DynamoDB table using Object Persistence Model","user":{"login":"juniorklein","id":5013497,"avatar_url":"https://avatars.githubusercontent.com/u/5013497?v=3","gravatar_id":"","url":"https://api.github.com/users/juniorklein","html_url":"https://github.com/juniorklein","followers_url":"https://api.github.com/users/juniorklein/followers","following_url":"https://api.github.com/users/juniorklein/following{/other_user}","gists_url":"https://api.github.com/users/juniorklein/gists{/gist_id}","starred_url":"https://api.github.com/users/juniorklein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juniorklein/subscriptions","organizations_url":"https://api.github.com/users/juniorklein/orgs","repos_url":"https://api.github.com/users/juniorklein/repos","events_url":"https://api.github.com/users/juniorklein/events{/privacy}","received_events_url":"https://api.github.com/users/juniorklein/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/aws/aws-sdk-java/labels/Feature%20Request","name":"Feature Request","color":"009800"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-03-17T13:21:20Z","updated_at":"2016-04-21T17:24:42Z","closed_at":"2016-04-21T17:24:42Z","body":"When I query or scan a table, I use DynamoDBQueryExpression or DynamoDBScanExpression respectively. \r\nUsing the methods addFilterCondition or withRangeKeyCondition, the attribute for comparison is passed with an instance of object Condition.\r\nUsing this model, I have a problem with the attribute name passed to the method. I need call the method with the attribute name for the attribute in the DynamoDB because the SDK don't allows the name of the property in the java class.\r\n\r\nFor example:\r\n\r\npublic class UserSocialNetworkItem {\r\n\r\n\t@DynamoDBHashKey(attributeName = \"ID\")\r\n\tprivate Long id;\r\n\t\r\n\t@DynamoDBRangeKey(attributeName = \"PropertyA\")\r\n\t@DynamoDBIndexHashKey(globalSecondaryIndexName = \"GSI1\")\r\n\tprivate String propertyA;\r\n\t\r\n\t@DynamoDBAttribute(attributeName = \"PropertyB\")\r\n\tprivate String propertyB;\r\n\t\r\n\t@DynamoDBAttribute(attributeName = \"PropertyC\")\r\n\t@DynamoDBIndexRangeKey(globalSecondaryIndexName = \"GSI2\")\r\n\tprivate Boolean propertyC;\r\n}\r\n\r\nWhen I query this table using filters in properties \"propertyA\" and \"propertyB\", the SDK only allows the query if I pass attribute name \"PropertyA\" and  \"PropertyB\".\r\nI believe the correct form is using the java class property name and not the Dynamo attribute name."}}