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 16e66c8d
authored
Dec 30, 2013
by
Mick Hansen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Undo bulkcreate stuff
1 parent
f7904548
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
1 additions
and
22 deletions
lib/dao-factory.js
lib/dialects/sqlite/query.js
test/dao-factory/create.test.js
lib/dao-factory.js
View file @
16e66c8
...
@@ -787,13 +787,6 @@ module.exports = (function() {
...
@@ -787,13 +787,6 @@ module.exports = (function() {
.
error
(
function
(
err
)
{
.
error
(
function
(
err
)
{
emitter
.
emit
(
'error'
,
err
)
emitter
.
emit
(
'error'
,
err
)
}).
success
(
function
(
rows
)
{
}).
success
(
function
(
rows
)
{
rows
.
forEach
(
function
(
row
,
i
)
{
Object
.
keys
(
daos
[
i
].
__factory
.
primaryKeys
).
concat
(
'id'
).
forEach
(
function
(
primarKey
)
{
if
(
row
.
hasOwnProperty
(
primarKey
))
{
daos
[
i
].
setDataValue
(
primarKey
,
row
[
primarKey
])
}
})
})
done
()
done
()
})
})
}
}
...
...
lib/dialects/sqlite/query.js
View file @
16e66c8
...
@@ -89,7 +89,7 @@ module.exports = (function() {
...
@@ -89,7 +89,7 @@ module.exports = (function() {
}
}
var
onSuccess
=
function
(
results
,
metaData
)
{
var
onSuccess
=
function
(
results
,
metaData
)
{
var
result
=
this
.
callee
var
result
=
this
.
callee
||
results
// add the inserted row id to the instance
// add the inserted row id to the instance
if
(
this
.
send
(
'isInsertQuery'
,
results
,
metaData
))
{
if
(
this
.
send
(
'isInsertQuery'
,
results
,
metaData
))
{
...
...
test/dao-factory/create.test.js
View file @
16e66c8
...
@@ -894,20 +894,6 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
...
@@ -894,20 +894,6 @@ describe(Support.getTestDialectTeaser("DAOFactory"), function () {
})
})
})
})
it
(
'should return instances with primary key values (autoincremented)'
,
function
(
done
)
{
var
Worker
=
this
.
sequelize
.
define
(
'Worker'
,
{})
Worker
.
sync
().
done
(
function
(
err
)
{
Worker
.
bulkCreate
([{},
{}]).
done
(
function
(
err
,
workers
)
{
expect
(
err
).
not
.
to
.
be
.
ok
expect
(
workers
).
to
.
be
.
ok
workers
.
forEach
(
function
(
worker
)
{
expect
(
worker
.
id
).
to
.
be
.
ok
})
done
()
})
})
})
describe
(
'enums'
,
function
()
{
describe
(
'enums'
,
function
()
{
it
(
'correctly restores enum values'
,
function
(
done
)
{
it
(
'correctly restores enum values'
,
function
(
done
)
{
var
self
=
this
var
self
=
this
...
...
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