Skip to content
This repository has been archived by the owner on Feb 28, 2023. It is now read-only.

Commit

Permalink
Merge pull request #2 from kdelmonte/master
Browse files Browse the repository at this point in the history
Fix issue were insert would break if the PK was a GUID due to the ada…
  • Loading branch information
davepreston authored Dec 4, 2018
2 parents f764cfb + 789d1de commit c2a8582
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions lib/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -382,8 +382,11 @@ module.exports = (function () {
Object.keys(values).forEach(function(key) {
values[key] = utils.prepareValue(values[key]);
if (pk == key && pk == 'id') {
identityInsert = true;
//console.log(pk, '==', key);
var type = connections[connection].collections[collection].definition['id'].type;
if(type === 'number'){
identityInsert = true;
//console.log(pk, '==', key);
}
}
});
var schemaName = getSchemaName(connection, collection);
Expand Down

0 comments on commit c2a8582

Please sign in to comment.