Fixing the model attach
This commit is contained in:
parent
b2d9f662e5
commit
e8cb132ed6
|
@ -9,9 +9,7 @@ var schema = {
|
|||
|
||||
var Color = app.model('color', schema);
|
||||
|
||||
app.dataSource('db', {adapter: 'memory'});
|
||||
|
||||
Color.dataSource('db');
|
||||
app.dataSource('db', {adapter: 'memory'}).attach(Color);
|
||||
|
||||
Color.create({name: 'red'});
|
||||
Color.create({name: 'green'});
|
||||
|
|
Loading…
Reference in New Issue