eclipse / jnosql

Eclipse JNoSQL is a framework which has the goal to help Java developers to create Jakarta EE applications with NoSQL.
Other
229 stars 72 forks source link

[BUG] dynamodb fixed to primary key type of string #435

Closed warmuuh closed 1 year ago

warmuuh commented 1 year ago

Which JNoSQL project the issue refers to?

JNoSQL dynamodb

Bug description

as can be seen here, the type of key doesnt really matter (for example a get 123 query) as it will be always passed as S to dynamodb.

this doesnt work for tables which have for example a N primary key

JNoSQL Version

1.0.1

Steps To Reproduce

use a query get 123 against a dynamodb table with a number primary key => The provided key element does not match the schema

Expected Results

allow requests to tables with non-string primary keys

Code example, screenshot, or link to a repository

https://github.com/eclipse/jnosql-databases/blob/main/jnosql-dynamodb/src/main/java/org/eclipse/jnosql/databases/dynamodb/communication/DynamoDBUtils.java#L60

warmuuh commented 1 year ago

after reading the code again, it even hardcodes the KEY-attributename to "key" (i hope, i missed something here). is this library even intended to be used right now or just a proof of concept?

EDIT: i realized that this integration is shoehorning dynamodb into a key-value db and a proper document-db integration is missing. please close this issue if you think, everything works as expected

otaviojava commented 1 year ago

Hey @warmuuh thank you for putting out this point. Yes, we need to support the document type. Thus, we will close this issue, please, feel free to raise a issue about document support.