You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PG.prototype.toFields=function(model,data,forCreate){varfields=[];varprops=this._models[model].properties;if(forCreate){varcolumns=[];Object.keys(data).forEach(function(key){if(props[key]){// I think problem is here!!if(key==='id')return;columns.push('"'+key+'"');fields.push(this.toDatabase(props[key],data[key]));}}.bind(this));return'('+columns.join(',')+') VALUES ('+fields.join(',')+')';}else{Object.keys(data).forEach(function(key){if(props[key]){fields.push('"'+key+'" = '+this.toDatabase(props[key],data[key]));}}.bind(this));returnfields.join(',');}};
Same here. When running the manipulation testes it shows the same result. The "name" property is not used by the postgres-adapter (or is there something I missed)
When I use custom field name, the fields are not inserted. Such like:
In
lib/postgres.js
:In above function,
props
is:and
Object.keys(data)
is[ 'last_login' ]
. So.props[key]
isfalse
and ignore the fields I use custom name.I'm not sure this is handle in whether jugglingdb or postgres-adapter.
The text was updated successfully, but these errors were encountered: