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

Commit d8b2fddd by Mick Hansen

Merge branch 'master' of github.com:sequelize/sequelize

2 parents 8eebac19 0f8a864a
Copyright (c) 2014 Sascha Depold
Copyright (c) 2014-2015 Sequelize contributors
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
......@@ -199,7 +199,7 @@ var Foo = sequelize.define('Foo', {
### Helper functions for use inside getter/setter definitions
* retrieving an underlying property value? always use `this.getDataValu()`, e.g:
* retrieving an underlying property value? always use `this.getDataValue()`, e.g:
```js
/* a getter for 'title' property */
......@@ -894,7 +894,7 @@ Project.sum('age', { where: { age: { gt: 5 } } }).then(function(sum) {
## Eager loading
When you are retrieving data from the database there is a fair chance that you also want to get their associations. This is possible since`v1.6.0`and is called eager loading. The basic idea behind that, is the use of the attribute`include`when you are calling`find`or`findAll`. Lets assume the following setup:
When you are retrieving data from the database there is a fair chance that you also want to get their associations. This is possible since`v1.6.0`and is called eager loading. The basic idea behind that, is the use of the attribute`include`when you are calling`find`or`findAll`. Lets assume the following setup:
```js
var User = sequelize.define('User', { name: Sequelize.STRING })
......
......@@ -42,7 +42,7 @@ module.exports = (function() {
this.through = true;
}
if (this.through) {
if (this.through === true) {
deprecated('belongsToMany: not defining through or defining through as true has been deprecated, please provide a string or a model');
}
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!