不要怂,就是干,撸起袖子干!

Commit eaa76e68 by jValdron

Deep cloning the findOptions in findAndCountAll

Since the ID was added automatically to the attributes, it caused duplicate fields in the generated queries on the findAll
1 parent 0f0a7c36
Showing with 1 additions and 1 deletions
......@@ -614,7 +614,7 @@ module.exports = (function() {
DAOFactory.prototype.findAndCountAll = function(findOptions, queryOptions) {
var self = this
// no limit, offset, order, attributes for the options given to count()
, countOptions = Utils._.omit(findOptions || {}, ['offset', 'limit', 'order', 'attributes'])
, countOptions = Utils._.omit(findOptions ? Utils._.merge({}, findOptions) : {}, ['offset', 'limit', 'order', 'attributes'])
return new Utils.CustomEventEmitter(function (emitter) {
var emit = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!