Closed renehauck closed 7 years ago
Thanks for reporting! Can you provide an example on how to reproduce it ?
I will also do some tests in the meantime, I have not seen this issue before.
I'm unable to find any scenario how this can happen
Can you provide more details?
Thanks
Sure,
I try this:
var article = {..,isOffer:false,...}
DynamoDB.table('articles').insert(article, function(err,data) {
console.log( err, data )
})
Next, I test the result:
this.dbManager.$DynamoDBOOPClient
.table(this.tableName)
.where('_id').eq(id)
.get((err, result) => {
....
expect(result.isOffer).to.not.be.true;
....
});
and get this error:
Uncaught AssertionError: expected undefined to be false
When i try this:
var article = {..,isOffer:true,...}
DynamoDB.table('articles').insert(article, function(err,data) {
console.log( err, data )
})
with
this.dbManager.$DynamoDBOOPClient
.table(this.tableName)
.where('_id').eq(id)
.get((err, result) => {
....
expect(result.isOffer).to.be.true;
....
});
I get no errors.
I hope it helps
can you add:
DynamoDB
.table(...)
.on('beforeRequest', function(op, payload) {
console.log(op, JSON.stringify(payload,null,"\t"))
})
for both insert() and get()
I just made another update before I wrote the functions. And now the boolean type works perfectly. I'm very sorry about this, that was my mistake :-(
No problem, good thing it works now 👍
If I use the boolean property "false", the property is presented as "undefined" in the database. What I have done wrong, or is this a bug?
Thanks :-)