Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit 03612872
authored
Feb 24, 2015
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: clashing table names in test
1 parent
55156002
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletions
test/integration/associations/belongs-to-many.test.js
test/integration/associations/belongs-to-many.test.js
View file @
0361287
...
...
@@ -224,12 +224,14 @@ describe(Support.getTestDialectTeaser('BelongsToMany'), function() {
it
(
'supports custom primary keys and foreign keys'
,
function
()
{
var
User
=
this
.
sequelize
.
define
(
'User'
,
{
'iduser'
:
{
'id
_
user'
:
{
type
:
DataTypes
.
UUID
,
primaryKey
:
true
,
defaultValue
:
DataTypes
.
UUIDV4
,
allowNull
:
false
}
},
{
tableName
:
'tbl_user'
});
var
Group
=
this
.
sequelize
.
define
(
'Group'
,
{
...
...
@@ -239,10 +241,14 @@ describe(Support.getTestDialectTeaser('BelongsToMany'), function() {
primaryKey
:
true
,
defaultValue
:
DataTypes
.
UUIDV4
}
},
{
tableName
:
'tbl_group'
});
var
User_has_Group
=
this
.
sequelize
.
define
(
'User_has_Group'
,
{
},
{
tableName
:
'tbl_user_has_group'
});
User
.
belongsToMany
(
Group
,
{
as
:
'groups'
,
through
:
User_has_Group
,
foreignKey
:
'id_user'
});
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment