コード例 #1
0
    def __subClone(self, pillow, feathers):
        if not feathers or not self._document:
            return

        path = feathers
        doc = None

        if ";" in feathers:
            path, doc = feathers.split(";")

        item = self._document.get(path)
        if not item:
            return

        from wallaby.common.document import Document

        newDoc = Document(data=copy.deepcopy(item))
        newDoc.resetDocumentID()

        if doc:
            yield DocumentChanger.transform(newDoc, doc)

        self._throw(Database.In.SaveDocument, (newDoc, None))