Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize order with include

Users.findAll({
  ...
  order: [
    [Roles, 'created_at', 'asc']
  ],
  
  include: [
    {
      model: Roles,
    },
  ],
  ...
});
 
PREVIOUS NEXT
Tagged: #sequelize #order #include
ADD COMMENT
Topic
Name
2+8 =