I create a model instance:
Rental.create({
user: 'john',
period: 4
}, (err, rental) => {
// is it possible to get rental id here?
});
The returned instance in the callback contains all I need but ID, which I need to perform other actions where I need it to be inserted into another entity.
How is it supposed to work when I need to create a new model instance and use its ID to do something else?