/大意如下:(CRM:Sequelize,Promise 流程控制); user instance {id:xx,username:xx}; store instance{id:xx,storename:xx}; 一个user关联多个store; 我想查找user时统计store数量; ------------------------------------------/ user_condition = { include:{ model.user } } model.user.all(user_condition) /输出:/ [{ id:xx, username:xx Stores:[{ id:xx, storename:xx }] }] /怎样统计Stores的数量?/
↧