old_contents: # -*- coding: utf-8 -*-
  
  from bson import ObjectId
  from modularodm import fields
  
  from framework.mongo import StoredObject
  
  
  class Session(StoredObject):
  
      _id = fields.StringField(primary=True, default=lambda: str(ObjectId()))
      date_created = fields.DateTimeField(auto_now_add=True)
      date_modified = fields.DateTimeField(auto_now=True)
      data = fields.DictionaryField()
  
      @property
      def persist(self):
          """True if the object exists in the DB"""
          return bool(self._stored_key)
  
new_contents: # -*- coding: utf-8 -*-
  
  from bson import ObjectId
  from modularodm import fields
  
  from framework.mongo import StoredObject
  
  
  class Session(StoredObject):
  
      _id = fields.StringField(primary=True, default=lambda: str(ObjectId()))
      date_created = fields.DateTimeField(auto_now_add=True)
      date_modified = fields.DateTimeField(auto_now=True)
      data = fields.DictionaryField()
subject: Remove deprecated property: `Session.persist`