I’m working on a project that I need to define a model from SQL Server views. Is it possible to define a model from views according to not to use table joins and decrease complexities.
Yes, you can point a Sequelize model at a view, rather than a table at least for SELECT statements (e.g.
model.findAll()) I doubt that
model.sync() would work against a view, but haven’t tested. IIRC, some databases allow INSERT, UPDATE or DELETE against views in limited cases) and in those limited cases you might be able to use
Answered By – KenOn10