diff --git a/README.md b/README.md index 4bcba989..5ab38976 100644 --- a/README.md +++ b/README.md @@ -347,6 +347,13 @@ db.Preload("Orders").Preload("Profile").Preload("Role").Find(&users) //// SELECT * FROM roles WHERE id IN (4,5,6); // belongs to ``` +#### Nested Preloading + +```go +db.Preload("Orders.OrderItems").Find(&users) +db.Preload("Orders", "state = ?", "paid").Preload("Orders.OrderItems").Find(&users) +``` + ## Update ```go