title: Saving Java enums in OrientDB
body: <p>I'm using OrientDB and I would like to save an enum in a field. Something like:</p>
  
  <pre><code>db.save(new ODocument("Car").field("color", Colors.BLUE));
  </code></pre>
  
  <p>This is the error I'm getting:</p>
  
  <pre>
  Exception in thread "main" com.orientechnologies.orient.core.exception.OSerializationException: Cannot serialize the object since it's not implements the OSerializableStream interface
  </pre>
  
  <p>The easy way to solve this would be to make the "color" property a <code>String</code> and then save it like <code>Colors.BLUE.name()</code> but if that was the case then I'm pretty sure there should be some way for Orient to handle this for me or, even better, some kind of <code>OType</code> that handles this in a more efficient way.</p>
  
  <p>Does anyone know what's the better approach to working with enums?</p>