Mongoose Association query

when you associate with mysql, you can use id to associate, and you can store two tables during the same database operation. Because the primary key id can be self-increasing and is not affected by other factors, the two tables can be associated with id, but the id of mongoose is generated by timestamp, which means that two tables are operated separately in the same function, and the order of execution makes it impossible to have the same id. Then how to associate with id? Or add an intermediate field to associate?


to match ref, in schema followed by db.find (). Populate ({path: 'refl', select:'fielid',options: {}})

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-1e475fa-65245.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-1e475fa-65245.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?