title: Multiple object in one LiveData
body: <p>I have this Entity:</p>
  
  <pre><code>@Entity
  public class CartItem {
      @PrimaryKey(autoGenerate = true)
      private long id;
      private long itemId;
      private long serviceId;
      private String observation;
      @Ignore
      private Service service;
      @Ignore
      private Item item;
  }
  </code></pre>
  
  <p>As you can see it's composed by others objects, in that case, <code>Service</code> and <code>Item</code>.</p>
  
  <p>In the fragment I'm implementing the LiveData this way:</p>
  
  <pre><code>CartItemViewModel model = CartItemViewModel.create(getActivity());
  model.getLiveData().observe(this, new Observer&lt;List&lt;CartItem&gt;&gt;() {
      @Override
      public void onChanged(@Nullable List&lt;CartItem&gt; cartItems) {
  
  }
  </code></pre>
  
  <p>It's working, <code>onChange</code> method is being called as expected.</p>
  
  <p>And this is my ViewModel in kotlin:</p>
  
  <pre><code>class CartItemViewModel : ViewModel() {
  
      val liveData: LiveData&lt;List&lt;CartItem&gt;&gt; = MainApplication.getInstance().cartItemDao.liveData
  
      companion object {
          @JvmStatic
          fun create(fragment: FragmentActivity): CartItemViewModel =
              ViewModelProviders.of(fragment).get(CartItemViewModel::class.java)
      }
  }
  </code></pre>
  
  <p>The point here is that <code>CartItem</code> are being loaded, however how can I fill, in the proper way, <code>Item</code> and <code>Service</code> object?</p>
  
  <p>If any another informaton is needed, please let me know.
  Thanks.</p>
  
  <p>Edit: Creating the Repository which makes <code>onChanged</code> don't be called anymore.</p>
  
  <pre><code>class CartItemRepository {
  
      companion object {
  
          fun getLiveData(): LiveData&lt;List&lt;CartItem&gt;&gt; {
              val liveData = MutableLiveData&lt;List&lt;CartItem&gt;&gt;()
  
              doAsync {
                  val cartItems = MainApplication.getInstance().cartItemDao.all
                  for (cartItem in cartItems) {
                      val item = MainApplication.getInstance().itemDao.get(cartItem.itemId)
                      cartItem.item = item
                      val service = MainApplication.getInstance().serviceDao.get(cartItem.serviceId)
                      cartItem.service = service
                  }
                  liveData.value = cartItems
              }
  
              return liveData
          }  
      }
  }
  </code></pre>