Comments (2)
I was hoping that TypeDORM would generate an update expression using DynamoDB's document path, like https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.Attributes.html#Expressions.Attributes.NestedElements.DocumentPathExamples
For an id
like 1
, I think the expression would end up as
{
ExpressionAttributeNames: {
'#attr0': 'attribute.name',
},
Key: {
pk: 'MyEntity#1',
},
ReturnValues: 'ALL_NEW',
TableName: 'MyTable',
UpdateExpression:
'REMOVE #attr0',
}
Or perhaps like this (sorry, my DynamoDB update expressions are weak)
{
ExpressionAttributeNames: {
'#attr0': 'attribute',
'#attr1': 'name',
},
Key: {
pk: 'MyEntity#1',
},
ReturnValues: 'ALL_NEW',
TableName: 'MyTable',
UpdateExpression:
'REMOVE #attr0.#attr1',
}
from typedorm.
I'd still love to hear information from the community, it's likely I'm missing something.
But, to update from what I've found.
TypeDORM can't work with nested attributes through entity manager.
I ended up refactoring entities here, to avoid the necessity of working with nested attributes. It's not a great solution in general, I think, but it worked.
from typedorm.
Related Issues (20)
- Is there support for complex types (Sets and Maps)?
- Transaction failing when updating entity with unique item and not updating unique value HOT 1
- Updating entity with unique item and fail
- Unable to query anything from DynamoDB
- Bundling error with serverless-bundle HOT 1
- I can update "number" fields but I can´t create them
- Support column name alias mapping
- "No such connection with name \"default\" exists" or "Connection Already Exists" HOT 2
- Add support for LSI/GSI to EntityManager.findOne() HOT 1
- @TransformToDynamo and @TransformFromDynamo not being called HOT 2
- Update TRANSACTION_WRITE_ITEMS_LIMIT to properly reflect Dynamo DB Transaction Limit HOT 1
- Setting values in a map attribute
- Attribute auto generation fails if typescript flag `useDefineForClassFields` is true HOT 1
- Support gentle fallback for codebases that cannot use emitDecoratorMetadata HOT 1
- Updating item SET IF_NOT_EXISTS and LIST_APPEND expected behavior
- WriteTransaction cancellation reasons not properly handled
- Does TypeDORM Support Write Sharding for DynamoDB? HOT 1
- EntityManager.find() with filter+limit can spawn thousands of recursive sequential queries HOT 2
- When update, decorated transformations on the primary key attributes are not applied.
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 typedorm.