不要怂,就是干,撸起袖子干!

Commit 253776f0 by Sascha Depold

minor changes

1 parent 1102fd56
Showing with 8 additions and 9 deletions
...@@ -176,11 +176,13 @@ OK... you can define classes and associations. You can save them. You would prob ...@@ -176,11 +176,13 @@ OK... you can define classes and associations. You can save them. You would prob
// project will be the first entry of the Projects table with the title 'aProject' || null // project will be the first entry of the Projects table with the title 'aProject' || null
}) })
Project.findAll({ title: 'smth' }, function(projects) { Project.findAll(function(projects) {
// projects will be an array of Project instances, having the title 'smth' // projects will be an array of all Project instances
}) })
# TODO # # TODO #
- deletion dependencies - deletion dependencies
- restrictions - restrictions
- migrations (changing a tables structure without deleting information) - migrations (changing a tables structure without deleting information)
- make findAll with conditions easier to use
- fix problems with datetime
\ No newline at end of file
...@@ -76,17 +76,13 @@ module.exports = { ...@@ -76,17 +76,13 @@ module.exports = {
var allFindAllTestItems = null var allFindAllTestItems = null
var FindAllTest = s.define('FindAllTest', {}) var FindAllTest = s.define('FindAllTest', {})
FindAllTest.drop(function() { Sequelize.chainQueries([
FindAllTest.sync(function() { {drop: FindAllTest}, {sync: FindAllTest}, {save: new FindAllTest({})}, {save: new FindAllTest({})}
new FindAllTest({}).save(function() { ], function() {
new FindAllTest({}).save(function() {
FindAllTest.findAll(function(findAlls) { FindAllTest.findAll(function(findAlls) {
allFindAllTestItems = findAlls allFindAllTestItems = findAlls
}) })
}) })
})
})
})
beforeExit(function(){ beforeExit(function(){
assert.equal(allFindAllTestItems.length, 2) assert.equal(allFindAllTestItems.length, 2)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!