-
Notifications
You must be signed in to change notification settings - Fork 46
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
Can I remove (update in general) nested attributes? #358
Comments
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 {
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',
} |
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. 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. |
I'm trying to use
EntityManager
to write an update statement to remove a nested attribute, kind of like the followingI don't think this is supported by TypeDORM at this time, but I hope I've missed something.
The text was updated successfully, but these errors were encountered: