mandarzope / loopback-connector-dynamodb

Loopback Adapter for DynamoDB
MIT License
14 stars 12 forks source link

query of table with both hash & sort keys fail if query is via only hash key #4

Open SippieCup opened 7 years ago

SippieCup commented 7 years ago

Primary key is missing for the parcel model

Error is due to the connector not creating a PK when no partition key is found available.

a possible hack to fix it would be appending a UUID to the id property if no sort key is found. The correct solution is probably implementing a new DAO for dynamodb which can handle loopback's generated methods correctly.

SippieCup commented 7 years ago

My newest version scraps the PK generation methodology and connects to loopback via composite IDs. this allows for me to query by just hash key.

My new implementation currently cannot update via API, but thats only because I havent converted the update function. overall it seems to be performing well.