title: How to insert a document in OrientDb?
body: <p>Although there is a similar question with an answer I am still unable to insert a row that contains a document.</p>
  
  <p>Any ideas how to achieve that?</p>
  
  <p>I have the below setup on OrientDB version 2.2.x.</p>
  
  <pre><code>CREATE CLASS TranslatableText ABSTRACT;
  CREATE PROPERTY TranslatableText.de IF NOT EXISTS STRING;
  CREATE PROPERTY TranslatableText.en IF NOT EXISTS STRING;
  
  CREATE CLASS Product;
  CREATE PROPERTY Product.id IF NOT EXISTS INTEGER;
  CREATE PROPERTY Product.name IF NOT EXIST EMBEDDEDMAP TranslatableText;
  </code></pre>
  
  <p>Then; I want to run the following INSERT statement.</p>
  
  <pre><code>INSERT INTO Product (id, name) VALUES (1, {"@type":"d", "@class": "TranslatableText", "de":"Auto", "en":"Car"});
  </code></pre>
  
  <p>And I get an error similar to the one below:</p>
  
  <pre><code>com.orientechnologies.orient.core.exception.OValidationException: The field 'Car.name' has been declared as EMBEDDEDMAP but an incompatible type is used. Value: TranslatableText{en:Car} DB name="some_db"
  </code></pre>
  
  <p><strong>Note</strong>: Please ignore small typos that you may see in the syntax as I typed all from scratch. Assume that there are no syntax errors, I've checked for all of these with some co-workers.</p>
  
  <p>Thanks in advance!</p>