undfinded _id for couchDB, 33 symbols ID generator
This commit is contained in:
parent
7e471407a3
commit
7a12003a35
@ -485,11 +485,11 @@ _createDocument = function (new_doc, dataset) {
|
||||
|
||||
if (dataset.record_create)
|
||||
new_doc = dataset.record_create(new_doc);
|
||||
if (_id !== 1) {
|
||||
if (_id !== 1 && _id !== undefined) {
|
||||
new_doc['_id'] = _id;
|
||||
}
|
||||
else {
|
||||
new_doc['_id'] = randomId(16, '#a');
|
||||
new_doc['_id'] = randomId(32, '#a');
|
||||
}
|
||||
dfd.resolve(cdb.upsert(new_doc));
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user