corrected indentation issues

This commit is contained in:
Sébastien Drouyer 2012-11-03 01:56:53 +01:00
parent fe8ed86301
commit 5aa0efd818
1 changed files with 13 additions and 13 deletions

View File

@ -710,22 +710,22 @@ AbstractClass.hasMany = function hasMany(anotherClass, params) {
* @param {Class} anotherClass - class to belong
* @param {Object} params - configuration {as: 'propertyName', foreignKey: 'keyName'}
*
* {Usage examples}
* Suppose model Post have a {belongsTo} relationship with User (the author of the post). You could declare it this way:
* Post.belongsTo(User, {as: 'author', foreignKey: 'userId'});
* {Usage examples}
* Suppose model Post have a {belongsTo} relationship with User (the author of the post). You could declare it this way:
* Post.belongsTo(User, {as: 'author', foreignKey: 'userId'});
*
* When a post is loaded, you can load the related author with:
* post.author(function(err, user) {
* // the user variable is your user object
* });
* When a post is loaded, you can load the related author with:
* post.author(function(err, user) {
* // the user variable is your user object
* });
*
* The related object is cached, so if later you try to get again the author, no additional request will be made.
* But there is an optional boolean parameter in first position that set whether or not you want to reload the cache:
* post.author(true, function(err, user) {
* // The user is reloaded, even if it was already cached.
* });
* The related object is cached, so if later you try to get again the author, no additional request will be made.
* But there is an optional boolean parameter in first position that set whether or not you want to reload the cache:
* post.author(true, function(err, user) {
* // The user is reloaded, even if it was already cached.
* });
*
* This optional parameter default value is false, so the related object will be loaded from cache if available.
* This optional parameter default value is false, so the related object will be loaded from cache if available.
*/
AbstractClass.belongsTo = function (anotherClass, params) {
var methodName = params.as;