title: Relationships across multiple Realms?
body: <p>Realm:</p>
  
  <p>We have the following scenario: There are several stores with employees and customers, several employees that could work at more than one store, and several customers that may shop at several stores. This could be represented with these classes</p>
  
  <pre><code>class Store {
      dynamic var id = ""
      dynamic var address = ""
      let workers = List&lt;Employee&gt;()
      let customers = List&lt;Customer&gt;()
  }
  
  class Customer {
      dynamic var id = ""
      dynamic var name = ""
      let stores = LinkingObjects(fromType: Store.self, property: "customers") 
      // ... many more fields about this customer
  }
  
  class Employee {
      var id
      var name
      let work = LinkingObjects(fromType: Store.self, property: "workers")
  }
  </code></pre>
  
  <p>The catch here is that we must protect customer information, so none of the customer info can be present in a shared realm and needs to be secure. Neither the store nor Employee data is a security matter. Our current approach is to give each customer their own realm, however, the major drawbacks to this is that requires massive duplication since each customer realm must copy the data of the store. The other drawback is that we would be copying customer data into a shared realm which is a security risk. What would be the best way to architect this scenario that allows for relationships across different Realms?</p>