dynamodb-toolbox
dynamodb-toolbox copied to clipboard
Way to skip Exception/Error when field does not have a mapping or alias
Hello there,
While using the Entity.putBatch
followed by table.batchWrite()
I incurred in the following error:
Error: Field 'newField' does not have a mapping or alias
The entity I want to persist comes from an external API, so it can happen that some new fields are added without notice, and that's exactly what happened in this case. Is there a way to instruct dynamodb-toolbox to just "skip" persistence of unknown fields, instead of rising this error?
Or is there a better way to approach this kind of problem?
@jeremydaly Thank you very much for the help!
any news about this? @jeremydaly
is this project dead?
@naorpeled, let's add an option to the put
, update
and putBatch
methods to allow for skipping the entity schema check.
Maybe strict: false
?
Also, all other checks (typing, required, etc.) should be enforced. This will just bypass a strict schema check for defined fields. Make sense?
@naorpeled, let's add an option to the
put
,update
andputBatch
methods to allow for skipping the entity schema check.Maybe
strict: false
?Also, all other checks (typing, required, etc.) should be enforced. This will just bypass a strict schema check for defined fields. Make sense?
100%, will implement it asap :)