Understanding of the Adonis workflow #1523
-
Hi. I've been using Adonis for a while and now I'm facing some problems which I'm not sure if they should happen or it's just the way it works. I have the following models: Product and Tags. A Product can have many Tags and they are related by the products_tags table. Every time tags change I update Products whith the following code: ProductController.js
Due to a problem in Vuetify, two requests are sent almost intermediately when you create a duplicated tag in the Combobox component. So Adonis receives request1 and request2 separeted by milliseconds. What happens with my code is the following:
This is the way it should work? I ask because I thought that request1 should be processed all over and then request 2 will be processed, something like this: request1 is received Please make comments about this. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
Why you expect the server to handle requests sequentially? |
Beta Was this translation helpful? Give feedback.
-
You can make use of transactions to persist your relationships without worrying about the fact that another request may interfere with the other request. |
Beta Was this translation helpful? Give feedback.
You can make use of transactions to persist your relationships without worrying about the fact that another request may interfere with the other request.