F
F
Fannasankh2020-03-23 20:49:11
JavaScript
Fannasankh, 2020-03-23 20:49:11

How to change tables related when using Loopback?

Loopback out of the box allows you to implement all the basic http methods for tables (get, post, etc.).
And how to implement it correctly if I need to change others when changing some data?
For example, if I have posts and comments, then Loopback allows me to DELETE /posts/:id , but how can I make comments on this post also be deleted if they are stored in a separate table?
I didn't find any suitable examples. Of course, you can call DELETE /comments/:id for each comment (or pass an array), but it seems to me that it is not correct to solve this on the front side.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stopy, 2020-03-24
@Stopy

The question is where?

but it seems to me that it is not right to decide this on the side of the front.

seems right

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question