title: RXJS 6 - saving collection after one entity
body: <p>This is my <code>registerOrde</code>, that saves and Order then a list of OrderedProduct, and then "returns" an Order.</p>
  
  <pre><code>private createOrder(order: Order): Observable&lt;Order&gt; {...}
      private createOrderedProduct(orderedProduct: OrderedProduct): Observable&lt;OrderedProduct&gt; {...}
      public registerOrder(order: Order): Observable&lt;Order&gt; {
      return new Observable&lt;Order&gt;(subscriber =&gt; {
        this.createOrder(order).subscribe(
          createdOrder =&gt; {
            if (order.orderedProducts) {
              let observableBatch = [];
              order.orderedProducts.forEach(orderedProduct =&gt; {
                orderedProduct.order = createdOrder;
                observableBatch.push(this.createOrderedProduct(orderedProduct));
              });
              forkJoin(observableBatch).subscribe(
                products =&gt; {
                  createdOrder.orderedProducts = products;
                  subscriber.next(createdOrder);
                  subscriber.complete();
                },
                error =&gt; {
                  subscriber.error(error);
                  subscriber.complete();
                }
              );
            } else {
              subscriber.next(createdOrder);
              subscriber.complete();
            }
          },
          error =&gt; {
            subscriber.error(error);
            subscriber.complete();
          }
        );
      });
  }
  </code></pre>
  
  <p>I would like to have the same behaviour but in a more correct way (i.e. using operators and removing the 'new Observable' instruction). I'm using Angular 6.</p>
  
  <p>What operators should I use? Any advice?</p>