We use sequelize on node js I have resourse File. File has attribute UserId. Need: copy same files (by filesId) to user. If use sql then need do:
INSERT INTO files (name, link, userId) SELECT name, link, 5 FROM files WHERE id in (1,2,3,4,10)
But how do it on sequelize I not have any ideas... Only custom sql query.