Mongoose find查询将默认值返回到最近添加的字段

Mongoose find查询将默认值返回到最近添加的字段,mongoose,Mongoose,以前是这个查询,现在是下面的查询 var cursor = this.find(query).select({ "alias": 1, "To": 1, "city": 1, "state": 1, "cdr": 1, "RecordUrl": 1, "From": 1, "Digits": 1, "bundle": 1, "callResult": 1, "advivrDuration": 1, "connectDuration": 1, "Duration": 1, "StartTime":

以前是这个查询,现在是下面的查询

var cursor = this.find(query).select({
"alias": 1,
"To": 1,
"city": 1,
"state": 1,
"cdr": 1,
"RecordUrl": 1,
"From": 1,
"Digits": 1,
"bundle": 1,
"callResult": 1,
"advivrDuration": 1,
"connectDuration": 1,
"Duration": 1,
"StartTime": 1,
"comment": 1,
"zipcode": 1,
}).sort({ StartTimeNumberEST: -1 }).hint({ StartTimeNumberEST: 1 }).lean().cursor();
m面临的问题是,在添加cpa后,要添加到数据中的cpa始终是默认值 它不会向我发送数据库中的确切值 对mongo db任何人来说都是新鲜事

模式:

var cursor = this.find(query).select({
"alias": 1,
"To": 1,
"city": 1,
"state": 1,
"cdr": 1,
"RecordUrl": 1,
"From": 1,
"Digits": 1,
"bundle": 1,
"callResult": 1,
"advivrDuration": 1,
"connectDuration": 1,
"Duration": 1,
"StartTime": 1,
"comment": 1,
"zipcode": 1,
"cpa": 1
}).sort({ StartTimeNumberEST: -1 }).hint({ StartTimeNumberEST: 1 }).lean().cursor();

}))

显示您的模式。它可能被虚拟的或类似的东西覆盖了。我确实更新了上面的模式
var Trans = new Mongoose.Schema({
_id: { type: String, required: true, unique: true },
transaction_id: { type: String },
corrects_transaction_id: { type: String },
original_order_id: { type: String },
complete_call_id: { type: String },
start_time_local: { type: Date },
start_time_xml: { type: Date },
StartTime: { type: String },
StartTimeNumberEST: { type: SchemaTypes.Long, min: 0, default: 0 },
StartTimeHour: { type: Number },
StartTimeDay: { type: String },
AnswerTime: { type: Date },
CustomeIvrTime: { type: Date },
EndTime: { type: Date },
corrected_at: { type: String },
offer: { type: String },
alias: { type: String },
tempoffer: { type: String },
cdr: { type: String },
bundle: { type: String },
From: { type: String },
To: { type: String },
callPromo: { type: String },
mobile: { type: String },
routed_to_number: { type: String },
city: { type: String },
state: { type: String },
zipcode: { type: String },
Digits: { type: String },
Duration: { type: Number },
connectDuration: { type: Number, default: 0 },
customivrDuration: { type: Number },
advivrDuration: { type: Number, default: 0 },
callResult: { type: String },
allCallResult: { type: String },
RecordingID: { type: String },
RecordUrl: { type: String },
cpa: { type: Number, default: 0 },
TotalCost: { type: Number },
BillDuration: { type: Number },
BillRate: { type: Number },
HangupCause: { type: String },
Direction: { type: String },
CallStatus: { type: String },
Event: { type: String },
media_type: { type: String },
transcription: { type: String },
affiliate_payout_localized: { type: String },
matching_affiliate_payout_policies: { type: String },
payout_conditions: { type: String },
opt_in_SMS: { type: Number },
transfer_from_type: { type: String },
comment: { type: String },