Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sequelize synchronous find

Can I do a synchronous find() with Sequelize? e.g.

const user = User.find({ id: 1 })

(This seems to just get a promise.)

like image 840
Noah Avatar asked Oct 18 '22 17:10

Noah


1 Answers

I ended up doing this

const user = yield User.find({ id });

It seems to work as expected.

like image 168
Noah Avatar answered Oct 27 '22 23:10

Noah