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

Commit 253776f0 by Sascha Depold

minor changes

1 parent 1102fd56
Showing with 11 additions and 13 deletions
......@@ -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.findAll({ title: 'smth' }, function(projects) {
// projects will be an array of Project instances, having the title 'smth'
Project.findAll(function(projects) {
// projects will be an array of all Project instances
})
# TODO #
- deletion dependencies
- restrictions
- migrations (changing a tables structure without deleting information)
\ No newline at end of file
- 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,15 +76,11 @@ module.exports = {
var allFindAllTestItems = null
var FindAllTest = s.define('FindAllTest', {})
FindAllTest.drop(function() {
FindAllTest.sync(function() {
new FindAllTest({}).save(function() {
new FindAllTest({}).save(function() {
FindAllTest.findAll(function(findAlls) {
allFindAllTestItems = findAlls
})
})
})
Sequelize.chainQueries([
{drop: FindAllTest}, {sync: FindAllTest}, {save: new FindAllTest({})}, {save: new FindAllTest({})}
], function() {
FindAllTest.findAll(function(findAlls) {
allFindAllTestItems = findAlls
})
})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!