Skip to content

Commit

Permalink
Add the same info to the error messages for sum, average and `gro…
Browse files Browse the repository at this point in the history
…upBy`
  • Loading branch information
rachaelshaw committed Apr 30, 2019
1 parent a9f6cb4 commit 18ff235
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions lib/waterline/utils/query/private/normalize-criteria.js
Expand Up @@ -239,6 +239,9 @@ module.exports = function normalizeCriteria(criteria, modelIdentity, orm, meta)
'usage has changed. Now, to run aggregate queries using the `groupBy` operator, '+
'use a native query instead.\n'+
'\n'+
'Alternatively, if you are using `groupBy` as a column/attribute name then '+
'please be advised that some things won\'t work as expected.\n'+
'\n'+
'For more info, visit:\n'+
'http://sailsjs.com/docs/upgrading/to-v1.0'
);
Expand All @@ -265,6 +268,9 @@ module.exports = function normalizeCriteria(criteria, modelIdentity, orm, meta)
' // ...'+'\n'+
'});'+'\n'+
'```\n'+
'Alternatively, if you are using `sum` as a column/attribute name then '+
'please be advised that some things won\'t work as expected.\n'+
'\n'+
'For more info, see:\n'+
'http://sailsjs.com/docs/reference/waterline-orm/models/sum'
);
Expand All @@ -288,6 +294,9 @@ module.exports = function normalizeCriteria(criteria, modelIdentity, orm, meta)
' // ...'+'\n'+
'});'+'\n'+
'```\n'+
'Alternatively, if you are using `average` as a column/attribute name then '+
'please be advised that some things won\'t work as expected.\n'+
'\n'+
'For more info, see:\n'+
'http://sailsjs.com/docs/reference/waterline-orm/models/avg'
);
Expand Down

0 comments on commit 18ff235

Please sign in to comment.