I define a schema like
{
'info' : {
'type' : 'dict',
'unique' : True,
'schema' : {
'propertyA' : {'type':'string'},
'propertyB' : {'type':'string'},
'propertyC' : {'type':'string'}
}
},
'others' : {'type':'string'}
}
Then, I post the following document twice, the first time it returns OK, and the second time it returns "not unique error".
[
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
}
]
But when I post a document list as follows:
[
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
},
{
"info" : {
"propertyA" : "a",
"propertyB" : "b",
"propertyC" : "c"
},
"others" : "other things"
}
]
The both documents are inserted to database.
Why they have different result?