Comments (2)
Thanks @RavyuS and @Nemo62. The pull request only fixed put
, but the same issue was possible with the delete
method as well. I've added a fix that puts an isEmpty
function in the utils
and then uses that to check the parameters when they are assembled. Thanks for everyone's input on this!
from dynamodb-toolbox.
expressionBuilder
is referenced putParams
(as parseConditions
in Entity.js:755). It returns an empty values
object by default, which is later assigned to ExpressionAttributeValues.
So exists
and other functions will result in the EmptyExpressionAttributeValues
error you see. My relatively primitive workaround replaces Entity.js:795 with
!isEmpty(ExpressionAttributeValues) ? { ExpressionAttributeValues } : null,
Where isEmpty is a custom function (whatever I found on google) that checks for empty objects.
Of course this is pretty dumb, but I thought of just sharing this!
from dynamodb-toolbox.
Related Issues (20)
- ⭐️ Support for transactions
- Provided key element does not match the schema HOT 5
- Type inference for batch operations
- get,put,update method type inference incorrect when extending Entity HOT 3
- Document that `type: "set"` and `convertClassInstanceToMap: true` do not go well together HOT 1
- Attributes with defaults that have depend on unresolvable attribute should be ignored
- Type Inference Issue with `Entity.get()` When Used Inside a Class Constructor HOT 10
- Derived state HOT 5
- Invalid Entity ? Is it related to the some version ? HOT 1
- Type inference of entity using EntityItem<typeof MyEntity> not resolving alias HOT 1
- Inferred Type cannot be named without reference to "ts-toolbelt" HOT 4
- Overlays break many constructor inputs
- Error when importing abstraction that uses dynamodb-toolbox HOT 1
- Bug on Item.get, where unneeded properties are required HOT 2
- Error when sending EntityV2 `GetItemCommand` with property of type `binary()` HOT 2
- Undefined dependencies for Index keys cause Update / Put failures
- Recent versions do not run onDefault if dependsOn contains undefined parameter HOT 2
- Got Error: Please provide a valid entity definition
- Created is changing with puts and is always the same as modified HOT 1
- Is `transform` valid for partition key?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dynamodb-toolbox.