Uploaded image for project: 'Realm Kotlin'
  1. Realm Kotlin
  2. RKOTLIN-496

Support single primary constructor models

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Local

      It would be great if the following works:

      Unable to find source-code formatter for language: kt. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
      class TestModel(
          var firstName: String,
          var lastName: String,
          var age: Int
      ) : RealmObject
      

      This was already mentioned in other issues like #184 but I wanted to create a tracking issue for the feature.

      The advantage would be that it is not possible to miss any properties when creating an instance of the model.
      Additionally, the variables don't have to be initialized with placeholder values in the code.

            Assignee:
            Unassigned Unassigned
            Reporter:
            unitosyncbot Unito Sync Bot
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: