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 4cd0fc9c
authored
Jun 05, 2014
by
Mick Hansen
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1856 from pola88/problem_with_timestamps
Problem with created_at and updated_at
2 parents
7c8bf549
82f6ec36
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
lib/dialects/abstract/query.js
test/associations/has-many.test.js
lib/dialects/abstract/query.js
View file @
4cd0fc9
...
...
@@ -260,8 +260,7 @@ module.exports = (function() {
,
mainDao
;
delete
result
[
this
.
options
.
joinTableModel
.
name
];
mainDao
=
this
.
callee
.
build
(
result
,
{
isNewRecord
:
false
,
isDirty
:
false
});
mainDao
=
this
.
callee
.
build
(
result
,
{
isNewRecord
:
false
,
isDirty
:
false
,
raw
:
true
});
mainDao
[
this
.
options
.
joinTableModel
.
name
]
=
joinTableDAO
;
return
mainDao
;
...
...
test/associations/has-many.test.js
View file @
4cd0fc9
...
...
@@ -750,6 +750,17 @@ describe(Support.getTestDialectTeaser("HasMany"), function() {
})
})
it
(
'gets all associated objects with all fields'
,
function
(
done
)
{
this
.
User
.
find
({
where
:
{
username
:
'John'
}}).
success
(
function
(
john
)
{
john
.
getTasks
().
success
(
function
(
tasks
)
{
tasks
[
0
].
attributes
.
forEach
(
function
(
attr
)
{
expect
(
tasks
[
0
]).
to
.
have
.
property
(
attr
)
})
done
()
})
})
})
it
(
"gets all associated objects when no options are passed"
,
function
(
done
)
{
this
.
User
.
find
({
where
:
{
username
:
'John'
}}).
success
(
function
(
john
)
{
john
.
getTasks
().
success
(
function
(
tasks
)
{
...
...
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