Skip to content

Commit b6dd220

Browse files
committed
bump to 0.5.6
1 parent 66ffe27 commit b6dd220

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

lib/loader.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Loader.prototype.loadFixture = function(fixture, models) {
7171
var where = {};
7272
Object.keys(Model.rawAttributes).forEach(function(k) {
7373
var fieldType = Model.rawAttributes[k].type.constructor.key;
74-
if (data.hasOwnProperty(k) && (!fixture.keys || fixture.keys.indexOf(k) !== -1) && fieldType !== 'GEOMETRY') {
74+
if (data.hasOwnProperty(k) && (!fixture.keys || fixture.keys.indexOf(k) !== -1) && fieldType !== 'GEOMETRY' && fieldType !== 'VIRTUAL') {
7575
//postgres
7676
if (fieldType === 'JSONB') {
7777
where[k] = {
@@ -87,9 +87,7 @@ Loader.prototype.loadFixture = function(fixture, models) {
8787
Model.rawAttributes[k].set.call(Model, data[k]);
8888

8989
// don't include VIRTUAL column in filter condition
90-
if (fieldType !== "VIRTUAL") {
91-
where[k] = val;
92-
}
90+
where[k] = val;
9391
} else {
9492
where[k] = data[k];
9593
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sequelize-fixtures",
3-
"version": "0.5.5",
3+
"version": "0.5.6",
44
"description": "sequelize fixture loader",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)