Description
Creating a new issue from here
I'm running into a similar issue, where I want to add an attribute to an existing ElectroDB entity where there are already items in DynamoDB without that new attribute. I want to query for an existing item, and since the new attribute isn't in the existing item, I want ElectroDB to call the
get
method of that attribute (defaulting that attribute to some value if it doesn't exist in the item)In @JoshBarr 's case, I think he may be adding the
replayedAt
attribute to an existing ElectroDB entity (see "even if the attribute does not exist on the Item" in his original question), and expecting to query for existing items and havereplayedAt
return an empty array (andisReplay
return false), since that attribute doesn't exist on the existing itemsFor example:
- Create items with this entity
- Add new attributes onto the entity and query for existing items (like this)