Comparing version 0.0.21 to 0.0.22
{ | ||
"name": "js-jpa", | ||
"version": "0.0.21", | ||
"version": "0.0.22", | ||
"description": "jpa for node", | ||
@@ -5,0 +5,0 @@ "author": "stone", |
@@ -37,5 +37,7 @@ const MysqlGenerator = require('./MysqlGenerator') | ||
let result = await super.executeInsert(context, schema, entity) | ||
SchemaUtil.setPrimaryValue(schema, entity, result.insertId) | ||
if (result.insertId > 0) { | ||
SchemaUtil.setPrimaryValue(schema, entity, result.insertId) | ||
} | ||
return entity | ||
} | ||
} |
21950
704