obj/src/persistence/MemoryPersistence.js
/**
     * Creates a data item.
     *
     * @param correlationId    (optional) transaction id to trace execution through call chain.
     * @param item              an item to be created.
     * @returns                 a created data item
     */
Creates a data item.
@param correlationId    (optional) transaction id to trace execution through call chain.
@param item              an item to be created.
@returns                 a created data item
Creates a data item . @param correlationId ( optional ) transaction id to trace execution through call chain . @param item an item to be created . @returns a created data item
create(correlationId, item) {
        return __awaiter(this, void 0, void 0, function* () {
            item = Object.assign({}, item);
            this._items.push(item);
            this._logger.trace(correlationId, "Created item %s", item['id']);
            yield this.save(correlationId);
            return item;
        });
    }
create ( correlationId , item ) { return __awaiter ( this , void 0 , void 0 , function * ( ) { item = Object . assign ( { } , item ) ; this . _items . push ( item ) ; this . _logger . trace ( correlationId , "Created item %s" , item [ 'id' ] ) ; yield this . save ( correlationId ) ; return item ; } ) ; }
Creates a data item.
Creates a data item .
// Clone the object