title: Backendless + realm - storing arrays
body: <p>I am new in backendless.com &amp; Realm.io</p>
  
  <p>I need to make a simple table with categories and few items that belong to categories</p>
  
  <p>I have a problem with getting data from backendless, because i make class that must be compatible with backendless and Realm the same time</p>
  
  <p>The problem is getting array from backendless:</p>
  
  <pre><code>class Category: Object {
  dynamic var objectId = ""
  dynamic var name = ""
  dynamic var listNumber = 0
  dynamic var imageName = ""
  dynamic var image: NSData? = nil
  dynamic var created: NSDate?
  dynamic var updated: NSDate?
  var dishes = List&lt;Dish&gt;() // &lt;- my problem
  </code></pre>
  
  <p>Problem with 'dishes'.</p>
  
  <p>Backendless manual says that i should do like this</p>
  
  <p><a href="https://backendless.com/feature-16-data-retrieval-api-how-to-load-objects-from-an-mbaas-storage/" rel="nofollow">https://backendless.com/feature-16-data-retrieval-api-how-to-load-objects-from-an-mbaas-storage/</a></p>
  
  <pre><code>var locations : [Location] = []
  </code></pre>
  
  <p>but Realm says that it not supports NSArray, and will work with List Format,</p>
  
  <pre><code>dynamic var dishes: [Dish] = [] // Terminating app due to uncaught exception 'RLMException', reason: ''NSArray' is not supported as an RLMObject property. All properties must be primitives, NSString, NSDate, NSData, RLMArray, or subclasses of RLMObject. See https://realm.io/docs/objc/latest/api/Classes/RLMObject.html for more information.'
  </code></pre>
  
  <p>And when i get array from backendless using  List , description of array looks like:</p>
  
  <pre><code>▿ [1] : Category {
  objectId = 52E0D354-F1B1-2F64-FFD8-B4129ED0DA00;
  name = Паста;
  listNumber = 2;
  imageName = pasta.png;
  image = &lt;(null) — 0 total bytes&gt;;
  created = 2016-03-12 17:07:35 +0000;
  updated = 2016-03-12 17:34:36 +0000;
  dishes = (
  );
  }
  </code></pre>
  
  <p>There is no dishes. But in fact they are.</p>
  
  <p>What i should do ? I don't know how to get array of relations from backendless when i use a List format.</p>
  
  <p><a href="http://i.stack.imgur.com/N63Y6.png" rel="nofollow">screenshot of backendless table</a></p>