title: How to store enums in Realm?
body: <p>How to store Java enum classes when using <a href="https://realm.io" rel="nofollow noreferrer">Realm</a>?</p>
  
  <p>From their <a href="https://realm.io/docs/java/latest" rel="nofollow noreferrer">documentation</a>, it seems like Realm is yet to support storing enums:</p>
  
  <blockquote>
    <p><strong>Field types</strong>
    Realm supports the following field types: <strong>boolean</strong>, <strong>byte</strong>, <strong>short</strong>, <strong>ìnt</strong>, <strong>long</strong>, <strong>float</strong>, <strong>double</strong>, <strong>String</strong>, <strong>Date</strong> and <strong>byte[]</strong>. The integer types byte, short, int, and long are all mapped to the same type (long actually) within Realm. Moreover, subclasses of RealmObject and RealmList are supported to model relationships.</p>
  </blockquote>
  
  <p>There are similar question that was asked for Objective-C and got answered <a href="https://stackoverflow.com/questions/29123245/using-enum-as-property-of-realm-model#">here</a>. None yet for Java though.</p>