Skip to content

Commit

Permalink
🔧 Rename association methods
Browse files Browse the repository at this point in the history
  • Loading branch information
noguchi-hiroshi committed Dec 19, 2017
1 parent 479ff34 commit 8f971a9
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/associations/belongs-to-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ var BelongsToMany = function(source, target, options) {
this.associationAccessor = this.as;

// Get singular and plural names, trying to uppercase the first letter, unless the model forbids it
var plural = Utils.uppercaseFirst(this.options.name.plural)
, singular = Utils.uppercaseFirst(this.options.name.singular);
var plural = Utils.camelize(Utils.uppercaseFirst(this.options.name.plural))
, singular = Utils.camelize(Utils.uppercaseFirst(this.options.name.singular));

this.accessors = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/associations/belongs-to.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ var BelongsTo = function(source, target, options) {
this.options.useHooks = options.useHooks;

// Get singular name, trying to uppercase the first letter, unless the model forbids it
var singular = Utils.uppercaseFirst(this.options.name.singular);
var singular = Utils.camelize(Utils.uppercaseFirst(this.options.name.singular));

this.accessors = {
/**
Expand Down
4 changes: 2 additions & 2 deletions lib/associations/has-many.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ var HasMany = function(source, target, options) {
this.associationAccessor = this.as;

// Get singular and plural names, trying to uppercase the first letter, unless the model forbids it
var plural = Utils.uppercaseFirst(this.options.name.plural)
, singular = Utils.uppercaseFirst(this.options.name.singular);
var plural = Utils.camelize(Utils.uppercaseFirst(this.options.name.plural))
, singular = Utils.camelize(Utils.uppercaseFirst(this.options.name.singular));

this.accessors = {
/**
Expand Down
2 changes: 1 addition & 1 deletion lib/associations/has-one.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ var HasOne = function(srcModel, targetModel, options) {
}

// Get singular name, trying to uppercase the first letter, unless the model forbids it
var singular = Utils.uppercaseFirst(this.options.name.singular);
var singular = Utils.camelize(Utils.uppercaseFirst(this.options.name.singular));

this.accessors = {
/**
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sequelize",
"description": "Multi dialect ORM for Node.JS/io.js",
"version": "3.25.0-p6",
"version": "3.25.0-p7",
"author": "Sascha Depold <sascha@depold.com>",
"contributors": [
{
Expand Down

0 comments on commit 8f971a9

Please sign in to comment.