1

We are using RavenDB as a persistent view model store, and we're working out how to structure our view models.

Let's take the sample of an OrderViewModel. Would you typically persist LineItemViewModels in the OrderViewModel document, or would you store LineItemViewModels in a separate collection, and have a list of LineItem IDs in the OrderViewModel document?

4

1 に答える 1

3

Unless you only need the line items on very rare occasions, store them together as per this post from Ayende http://ayende.com/blog/4546/modeling-hierarchical-structures-in-ravendb

于 2013-02-11T20:06:22.440 に答える