How Sequelize saves two tables at a time

clipboard.png

as shown in the figure, Table 1 is associated with Table 2. How to click submit and save the two tables together


Front

axios.post('/post',{data:1,data2:2});

backend (KOA, for example, requires koa-bodyparser middleware)

const {data,data2} = ctx.request.body;
const [model,model2] = await Promise.all([Model.create(data),Model2.create(data2)]);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30689-2bd1d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30689-2bd1d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?