Merge branch 'master' of github.com:bitemyapp/esqueleto

This commit is contained in:
Chris Allen 2018-02-27 17:45:26 -06:00
commit afdc7f792b
2 changed files with 2 additions and 2 deletions

View File

@ -192,7 +192,7 @@ which generates this SQL:
SELECT P1.*, Follow.*, P2.*
FROM Person AS P1
INNER JOIN Follow ON P1.id = Follow.follower
INNER JOIN P2 ON P2.id = Follow.followed
INNER JOIN Person AS P2 ON P2.id = Follow.followed
```
Note carefully that the order of the ON clauses is reversed! You're required to write your `on`s in reverse order because that helps composability (see the documentation of `on` for more details).

View File

@ -311,7 +311,7 @@ import qualified Database.Persist
-- SELECT P1.*, Follow.*, P2.*
-- FROM Person AS P1
-- INNER JOIN Follow ON P1.id = Follow.follower
-- INNER JOIN P2 ON P2.id = Follow.followed
-- INNER JOIN Person AS P2 ON P2.id = Follow.followed
-- @
--
-- In @esqueleto@, we may write the same query above as: