Indexes should always include the 'type' property...
...since it is implicitly added to all selectors
This commit is contained in:
parent
d32eb0d728
commit
4fba94f1fa
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "pouchtype",
|
||||
"version": "1.0.0",
|
||||
"version": "1.0.1",
|
||||
"description": "Document Management Layer for PouchDB",
|
||||
"main": "src/index.js",
|
||||
"files": ["dist", "lib", "src"],
|
||||
|
||||
@ -124,7 +124,7 @@ export class TypeHandler {
|
||||
return this.db.createIndex({
|
||||
index: {
|
||||
ddoc: `${this.type}_${name}`,
|
||||
fields: fields,
|
||||
fields: fields.indexOf('type') === -1 ? fields.concat('type') : fields,
|
||||
name
|
||||
}
|
||||
});
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user