Open shoaibmerchant opened 10 years ago
+1
The idea of a single create, instead of the create that expects an array is very handy. Specifically because you can then just return the created object (ID and all).
Person.create({ name: "John", surname: "Doe" }, function (err, John) {
// John.id is set.
});
+1
I am using MySQL as the database with the orm and my Primary Key is set as Auto-Increment. Is there any way to retrieve the last Insert ID on create for the PK or any existing implementation that would help.