﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Daniel Lang commented on Tertiary includes in RavenDB</title><description>I don't think it was a good decision to make this an 'official' feature by posting it on your blog. It's still far too complicated, so it will produce lots of confusion when people try to use it. If at all, I would rather have it support syntax like this:

.Include("Lines,Product,Location")

But that would be hard to implement I guess.</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment11</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment11</guid><pubDate>Fri, 15 Jun 2012 12:00:07 GMT</pubDate></item><item><title>Ayende Rahien commented on Tertiary includes in RavenDB</title><description>Steve,
For orders?
Order generally comes in two shapes.
One is mutable, not really important, it has no real meaning except as a container for stuff user wants to buy

One is fixed, after you processed the order, and cannot be changed.
</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment10</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment10</guid><pubDate>Fri, 15 Jun 2012 09:52:41 GMT</pubDate></item><item><title>Steve Py commented on Tertiary includes in RavenDB</title><description>Without diving into tertiary relations, since you bring up the temporal issue again: Can you walk through what happens when you want to change orders/1 line for products/1 quantity from 3 to 4? Does orders/1 become orders/2, or do you edit it to have a 3rd line where the original gets marked off with an end date? How do you dive through the indexing to ensure the correct data state for a particular point in time is returned?

I know how to do this with relational data &amp; SQL, just curious how a NoSQL solution changes perspective on this problem.</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment9</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment9</guid><pubDate>Thu, 14 Jun 2012 21:38:08 GMT</pubDate></item><item><title>Ayende Rahien commented on Tertiary includes in RavenDB</title><description>Tyler,
*snort*, see http://ayende.com/blog/156353/entities-associations-point-in-time-vs-current-associations</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment8</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment8</guid><pubDate>Thu, 14 Jun 2012 17:45:20 GMT</pubDate></item><item><title>Tyler Burd commented on Tertiary includes in RavenDB</title><description>...or are you saying that you should do something like this with the Orders model:

Lines: [
  {
   Product: "products/1",
   Quantity: 3,
   Location: "locations/1234"
  }
]

In this case, when the location of a product changes, does that mean you would have to update the Product model AND all of the Orders that use that product to use that new location?

TLDR; If I want to change the location of "products/1" to "location/5555", do I have to manually update the Product model AND the Orders to that new location?</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment7</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment7</guid><pubDate>Thu, 14 Jun 2012 17:17:23 GMT</pubDate></item><item><title>Tyler Burd commented on Tertiary includes in RavenDB</title><description>I definitely see that, I'm just trying to wrap my head around the maintenance of not having "once source of truth", but twenty sources of truth.  I can envision developers that aren't aware of those twenty sources performing updates to *some* of them, but not all, causing data disparity.  Then we have a maintenance nightmare where "location/1" has different Street Address in it than what is in the Order model for the "location/1" Street Address.</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment6</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment6</guid><pubDate>Thu, 14 Jun 2012 16:38:10 GMT</pubDate></item><item><title>Ayende Rahien commented on Tertiary includes in RavenDB</title><description>Tyler,
You see the problem, right?
That is the modeling issue.
Either locations are important to the order for another reason, or they aren't.
If they are important, they should be with the order, if they aren't, why do you need tertiary include for it?</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment5</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment5</guid><pubDate>Thu, 14 Jun 2012 16:19:00 GMT</pubDate></item><item><title>Tyler Burd commented on Tertiary includes in RavenDB</title><description>If you did associate locations with the order, does that mean you would then have to ensure that the "denormalized" location data is kept up to date whenever a location changes?  Assuming you have 20 different models that require location data within them, would that mean writing the same info 20 separate times in application code (write the location change to Model 1, now Model 2, now Model 3, etc.), or is there some way Raven can sync them automatically?</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment4</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment4</guid><pubDate>Thu, 14 Jun 2012 16:10:00 GMT</pubDate></item><item><title>Matt commented on Tertiary includes in RavenDB</title><description>Ok yep can definitely see that, I was more thinking of a read scenario than a write.</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment3</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment3</guid><pubDate>Thu, 14 Jun 2012 14:00:49 GMT</pubDate></item><item><title>Ayende Rahien commented on Tertiary includes in RavenDB</title><description>Matt,
I don't like this because it means that your operations doesn't match your model.
If you need to do stuff to locations from the order, why isn't it also associated with the order?</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment2</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment2</guid><pubDate>Thu, 14 Jun 2012 13:58:46 GMT</pubDate></item><item><title>Matt commented on Tertiary includes in RavenDB</title><description>Just out of curiousity, how would you model the domain to avoid this?  Why is it poor to have location as its own document and need to know information about it from an order?</description><link>http://ayende.com/156321/tertiary-includes-in-ravendb#comment1</link><guid>http://ayende.com/156321/tertiary-includes-in-ravendb#comment1</guid><pubDate>Thu, 14 Jun 2012 13:52:20 GMT</pubDate></item></channel></rss>