@classmethod
    def insert(klass, to_insert):
        from Mojo.ServerHelpers.RunServer import BACKEND_COLLECTION, DATABASE

        if DATABASE:
            if BACKEND_COLLECTION:
                this_collection = BACKEND_COLLECTION(DATABASE, klass)
                self.validate()
                ret_obj = this_collection.insert(to_insert)

                return ret_obj
Insert a model into the database (blocking).
dataset/ETHPy150Open lonelycode/Mojo/Mojo/ObjectMapper/ModelPrototype.py/Model.insert