sequelize-fixtures
Advanced tools
Comparing version 0.5.1 to 0.5.2
@@ -38,2 +38,6 @@ var Promise = require('bluebird'); | ||
throw new Error('Model not found: ' + fixture.model); | ||
} else if (typeof Model === 'function') { | ||
throw new Error('models.' + fixture.model + ' appears to be a function. Perhaps you are importing model factory function? You should then use sequelize.import to create your model, see https://github.com/sequelize/express-example/blob/master/models/index.js#L17'); | ||
} else if (!Model.findOne) { | ||
throw new Error('models.' + fixture.model + ' is not a sequelize model.'); | ||
} | ||
@@ -40,0 +44,0 @@ |
{ | ||
"name": "sequelize-fixtures", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"description": "sequelize fixture loader", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -310,16 +310,16 @@ [![Build Status](https://travis-ci.org/domasx2/sequelize-fixtures.svg?branch=master)](https://travis-ci.org/domasx2/sequelize-fixtures) | ||
{ | ||
model: 'Movie', | ||
data: { | ||
name: 'Terminator' | ||
"model": "Movie", | ||
"data": { | ||
"name": "Terminator" | ||
} | ||
}, | ||
{ | ||
model: 'Actor', | ||
data: { | ||
name: 'Arnie', | ||
movies: [ | ||
"model": "Actor", | ||
"data": { | ||
"name": "Arnie", | ||
"movies": [ | ||
{ | ||
name: 'Terminator', | ||
_through: { | ||
character: 'T-80' | ||
"name": "Terminator", | ||
"_through": { | ||
"character": "T-80" | ||
} | ||
@@ -326,0 +326,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51807
1092