File tree Expand file tree Collapse file tree 2 files changed +3
-5
lines changed
Expand file tree Collapse file tree 2 files changed +3
-5
lines changed Original file line number Diff line number Diff 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 }
Original file line number Diff line number Diff line change 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" : {
You can’t perform that action at this time.
0 commit comments