Skip to content

Adonis 4.1 - Update many tables at the same time. #1292

Answered by McSneaky
pauloscript asked this question in Help
Discussion options

You must be logged in to vote

I'm not too sure what you are looking for?
Perhaps something like sync()? https://adonisjs.com/docs/4.1/relationships#_sync
Or just multi update? You can use bulk update for that: https://adonisjs.com/docs/4.0/lucid#_bulk_updates

await ModelToUpdate.query().update({ phone: 123123).where('classAId', 10 });

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@pauloscript
Comment options

@McSneaky
Comment options

@pauloscript
Comment options

Answer selected by pauloscript
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants