不要怂,就是干,撸起袖子干!

Commit fca6f724 by Mick Hansen

Merge pull request #4749 from Nicktho/patch-1

Update querying documentation
2 parents 2ec7baac c87f4ea1
Showing with 9 additions and 0 deletions
......@@ -254,6 +254,15 @@ something.findOne({
// Will order by otherfunction(`col1`, 12, 'lalala') DESC
[sequelize.fn('otherfunction', sequelize.col('col1'), 12, 'lalala'), 'DESC'],
// Will order by name on an associated User
[User, 'name', 'DESC'],
// Will order by name on an associated User aliased as Friend
[{model: User, as: 'Friend'}, 'name', 'DESC'],
// Will order by name on a nested associated Company of an associated User
[User, Company, 'name', 'DESC'],
]
// All the following statements will be treated literally so should be treated with care
order: 'convert(user_name using gbk)'
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!