From 2f40e3848453824e8e08627608140ee12161379d Mon Sep 17 00:00:00 2001 From: Simon Binder Date: Sun, 5 Jan 2020 21:36:00 +0100 Subject: [PATCH] Update relationships example to use extensions --- docs/content/en/docs/Examples/relationships.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/content/en/docs/Examples/relationships.md b/docs/content/en/docs/Examples/relationships.md index 52893623..1dd7c394 100644 --- a/docs/content/en/docs/Examples/relationships.md +++ b/docs/content/en/docs/Examples/relationships.md @@ -129,7 +129,7 @@ type of transformation, RxDart's `switchMap` comes in handy: ```dart Stream> watchAllCarts() { // start by watching all carts - final cartStream = Observable(select(shoppingCarts).watch()); + final cartStream = select(shoppingCarts).watch(); return cartStream.switchMap((carts) { // this method is called whenever the list of carts changes. For each @@ -146,7 +146,7 @@ Stream> watchAllCarts() { buyableItems.id.equalsExp(shoppingCartEntries.item), ) ], - )..where(isIn(shoppingCartEntries.shoppingCart, ids)); + )..where(shoppingCartEntries.shoppingCart.isIn(ids)); return entryQuery.watch().map((rows) { // Store the list of entries for each cart, again using maps for faster