Skip to content

Commit c6c2d17

Browse files
committed
feat: deprecate .all
1 parent 1bc8b0e commit c6c2d17

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lib/model.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,10 +1426,6 @@ class Model {
14261426
return self;
14271427
}
14281428

1429-
static all(options) {
1430-
return this.findAll(options);
1431-
}
1432-
14331429
/**
14341430
* Search for multiple instances.
14351431
*
@@ -1495,8 +1491,6 @@ class Model {
14951491
*
14961492
* The promise is resolved with an array of Model instances if the query succeeds.
14971493
*
1498-
* __Alias__: _all_
1499-
*
15001494
* @param {Object} [options] A hash of options to describe the scope of the search
15011495
* @param {Object} [options.where] A hash of attributes to describe your search. See above for examples.
15021496
* @param {Array<String>|Object} [options.attributes] A list of the attributes that you want to select, or an object with `include` and `exclude` keys. To rename an attribute, you can pass an array, with two elements - the first is the name of the attribute in the DB (or some kind of expression such as `Sequelize.literal`, `Sequelize.fn` and so on), and the second is the name you want the attribute to have in the returned instance
@@ -4230,6 +4224,10 @@ Model.insertOrUpdate = function () {
42304224
Utils.deprecate('Model.insertOrUpdate has been deprecated, please use Model.upsert instead');
42314225
return Model.upsert.apply(this, arguments);
42324226
};
4227+
Model.all = function () {
4228+
Utils.deprecate('Model.all has been deprecated, please use Model.findAll instead');
4229+
return Model.findAll.apply(this, arguments);
4230+
};
42334231
Model.prototype.updateAttributes = function () {
42344232
Utils.deprecate('Instance.updateAttributes has been deprecated, please use Instance.update instead');
42354233
return Model.prototype.update.apply(this, arguments);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy