Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sequelize order with include

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