0

I'm trying to define the schema for a field that will either be a string value or NULL.

From what I can tell, this should work:

myField: [String, dynamoose.type.NULL]

However, when it encounters a null value in the table, I get the following error:

TypeMismatch: Expected example.myField to be of type string, instead found type null.

The only thing I've found that works is setting the field to dynamoose.type.ANY, which seems like it defeats the purpose of defining the field at all.

Scott Thiessen
  • 873
  • 7
  • 20

0 Answers0