Changelog
1.0.0-alpha.3
Introduces "include" syntax for joins.
const posts = await Post.find({
include: {
model: User,
as: 'creator'
}
})
expect(posts[0]).toHaveProperty('creator.name')
This will use the creator
key in each Post to find a user and join it at creator
.