Could not find a model with id

452 Views Asked by At

I can successfully create an object in ArangoDB using loopback-connector-arango. But while updating the item, it will not get updating into database instead getting an error:

could not find a model with id.

What I have is:

list.component.ts

updateGrocery(id) {

    this.listModel.name = this.groceryEdit.name;
    this.listService.updateItems(id, this.listModel)
        .subscribe(
        () => {
            this.store.dispatch(this.heroActions.loadHeroes());
        }
        )
    };

list.service.ts

updateItems(id, list: ItemList) {
    return this.itemListApi.updateAttributes(id,
        {
            "name": list.name
        }
    );
};

I am using Angular2 and TypeScript to develop this app, this is in angular2seedadvanced app and loopbacksdk builder. How can i solve this issue? Any help will very helpful and highly appreciable.

0

There are 0 best solutions below