1
var conditionalData = {
id: {
$Between: [11, 15]
},
technician_id: technicianId
};
var attributes = ['id', 'service_start_time', 'service_end_time'];
userServiceAppointmentModel.findAll({
where: conditionalData,
attributes: attributes
}).complete(function (err, serviceAppointmentResponse) {
if (err) {
var response = constants.responseErrors.FETCHING_DATA;
return callback(err, null);
} else {
if (serviceAppointmentResponse.length > 0) {
var response = constants.responseErrors.NO_AVAILABLE_SLOTS_IN_YOUR_CALENDAR;
return callback(response, null);
}
}
);
當我運行上面的查詢它給了我錯誤的如何在Sequelize中使用運算符?
「消息」: 「ER_SP_DOES_NOT_EXIST:FUNCTION user_service_appointment.id 不存在」
感謝。我使用2.0.3版本的續集 – Gurpinder 2015-02-24 09:18:07
非常感謝它的工作。 – Gurpinder 2015-02-24 09:22:54