title: MongoEngine ValidationError
body: <p>i have to creating a database and what to check whether all the entries are being input in the database or not using the python shell.</p>
  
  <p>i wrote a class called Trial</p>
  
  <pre><code>class Trial(db.Document):
      project_name = db.StringField(max_length=255,required=True)
      list_of_materials = db.ListField(db.EmbeddedDocumentField('List_Of_Materials'))
      abstract = db.StringField(max_length=255,required=True)
      vehicle = db.StringField(max_length=255,required=False)
      responsibilities = db.ListField(db.EmbeddedDocumentField('Responsibilities')) 
  </code></pre>
  
  <p>and i defined classes List_of_Materials and Responsibilities as follows:</p>
  
  <pre><code>class Responsibilities(db.EmbeddedDocument):
      employee = db.StringField(max_length=255, required = True)
      objective = db.StringField(max_length=255, required = True)
  
  class List_Of_Materials(db.EmbeddedDocument):
      mat_name = db.StringField(max_length=255, required=True)
      mat_type = db.StringField()
      mat_comments = db.StringField(max_length = 255)
  </code></pre>
  
  <p>now i use the python shell to make an entry into the database.</p>
  
  <pre><code>trial_test = Trial(project_name = 'nio field trip management',
                  list_of_materials = [List_Of_Materials(mat_name = 'Laptop')],
                  abstract = 'All is well that ends well',
                  vehicle = Vehicle(veh_name='My Laptop',veh_num='GA07EX1234'),
                  responsibilities = [Responsibilities(employee='Prashant',objective='Setup the Website')],
  </code></pre>
  
  <p>and i get the following error :</p>
  
  <pre><code>Traceback (most recent call last):
    File "&lt;stdin&gt;", line 12, in &lt;module&gt;
    File "C:\Anaconda\lib\site-packages\mongoengine\base\document.py", line 85, in __init__
      value = field.to_python(value)
    File "C:\Anaconda\lib\site-packages\mongoengine\base\fields.py", line 261, in to_python
      self.error('You can only reference documents once they'
    File "C:\Anaconda\lib\site-packages\mongoengine\base\fields.py", line 124, in error
  raise ValidationError(message, errors=errors, field_name=field_name)
  mongoengine.errors.ValidationError: You can only reference documents once they have been saved to the database
  </code></pre>
  
  <p>LINE 12 of the code is <code>responsibilities=db.ListField(db.EmbeddedDocumentField('Responsibilities'))</code></p>
  
  <p>What i could interpret from the above error is that we can have to first entry into the classes "Responsibilities" and "List_Of_Material" , but the entry in "List_Of_Material" does not show any error while the ones in "Responsibilities" show the above error.</p>
  
  <p>What can i do to avoid this problem?</p>