Skip to content
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

Empty ExpressionAttributeValues generated when using conditions #47

Closed
aldebout opened this issue May 11, 2020 · 2 comments
Closed

Empty ExpressionAttributeValues generated when using conditions #47

aldebout opened this issue May 11, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@aldebout
Copy link

I tried to do

MyEntity.delete(
  {
    pk,
    sk,
  },
  { conditions: { attr: 'username', exists: true } },
)

but I'm getting ExpressionAttributeValues must not be empty because the generated params are

{ TableName: '',
  Key:
   { PK: '',
     SK: '' },
  ExpressionAttributeNames: { '#attr1': 'username' },
  ExpressionAttributeValues: {},
  ConditionExpression: 'attribute_exists(#attr1)' }

I'm not 100% sure my use case is valid DDB but this might be on the library ;)

@BDQ
Copy link

BDQ commented Jun 4, 2020

I'm seeing the same error, with a put when using exists: false as the only condition.

@jeremydaly jeremydaly added the bug Something isn't working label Jul 11, 2020
@jeremydaly
Copy link
Owner

This was resolved by a fix for #51.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants