title: Realm not writing correctly
body: <p>I've been trying to use Realm to create a db for my cocos2d game, but can't figure out some problem. I'm using Realm Objective-C 0.92.3 (<a href="https://realm.io/docs/objc/latest/" rel="nofollow">https://realm.io/docs/objc/latest/</a>) since I need my game to work on iOS 7 or later.</p>
  
  <p>I've been using some small code to write and read but somehow it isn't working.</p>
  
  <pre><code>     let realm = RLMRealm.defaultRealm()
       var tempo = EnemyDB()
       tempo.damage = 7
       realm.beginWriteTransaction()
       realm.addObject(tempo)
       realm.commitWriteTransaction()
       var temp = EnemyDB.allObjects()
  </code></pre>
  
  <p>Somehow this is returning empty object (temp  = RLMResults! Unevaluated query on    0x00007f954708a070), does anyone see any problem?</p>
  
  <p>Thank you for any help</p>
  
  <p>EDIT:</p>
  
  <pre><code>import Foundation
  
  class EnemyDB : RLMObject {
       var damage : Int!
  }
  </code></pre>