title: Kotlin Realm: Class must declare a public constructor with no arguments if it contains custom constructors
body: <p>I'm creating a <strong>Realm</strong> object in <strong>Kotlin</strong>.</p>
  
  <p><strong>Realm Object:</strong></p>
  
  <pre><code>open class PurposeModel(var _id: Long?,
                          var purposeEn: String?,
                          var purposeAr: String?) : RealmObject()
  </code></pre>
  
  <p>When I compile the above code I'm getting this error:</p>
  
  <pre><code>error: Class "PurposeModel" must declare a public constructor with no arguments if it contains custom constructors.
  </code></pre>
  
  <p>I can't find any question related to this in Kotlin. How do I resolve this?</p>