|
|
@ -294,6 +294,10 @@
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
module.getObjectField = function(key, field, callback) {
|
|
|
|
module.getObjectField = function(key, field, callback) {
|
|
|
|
|
|
|
|
if(typeof field !== 'string') {
|
|
|
|
|
|
|
|
field = field.toString();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
field = field.replace(/\./g, '\uff0E');
|
|
|
|
module.getObjectFields(key, [field], function(err, data) {
|
|
|
|
module.getObjectFields(key, [field], function(err, data) {
|
|
|
|
if(err) {
|
|
|
|
if(err) {
|
|
|
|
return callback(err);
|
|
|
|
return callback(err);
|
|
|
@ -307,11 +311,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
var _fields = {};
|
|
|
|
var _fields = {};
|
|
|
|
for(var i=0; i<fields.length; ++i) {
|
|
|
|
for(var i=0; i<fields.length; ++i) {
|
|
|
|
if(typeof fields[i] !== 'string') {
|
|
|
|
if (typeof fields[i] !== 'string') {
|
|
|
|
_fields[fields[i].toString().replace(/\./g, '\uff0E')] = 1;
|
|
|
|
fields[i] = fields[i].toString();
|
|
|
|
} else {
|
|
|
|
|
|
|
|
_fields[fields[i].replace(/\./g, '\uff0E')] = 1;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fields[i] = fields[i].replace(/\./g, '\uff0E');
|
|
|
|
|
|
|
|
_fields[fields[i]] = 1;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
db.collection('objects').findOne({_key:key}, _fields, function(err, item) {
|
|
|
|
db.collection('objects').findOne({_key:key}, _fields, function(err, item) {
|
|
|
|