How does sequelize give one-to-many associated tables create records at the same time

  1. problem description: there are two tables with one to many. The json data received from the front end already contains the records of the main table and the child table. How can create be recorded as the best solution?

2. Table structure such as:

[user]:name,age;
[record]:userid,recordinfo;

3. Json: received from the front end

{"user":{name:"",
         age:20,
         record:[
             {recordinfo:"1925"},
             {recordinfo:"1945"},
             {recordinfo:"1949"}
         ]}

4. How to use sequelize to create, the best?

Jun.23,2021
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-1b3c7b1-2c30c.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-1b3c7b1-2c30c.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?