Skip to content

Ignore field when batch.update #1367

Answered by North101
lsaudon asked this question in Q&A
Discussion options

You must be logged in to vote

Use a Companion. One is generated for each table.

TodosCompanion(
  category: Value(target.id),
);

You need to wrap each value in Value(<value>) and if you don't want to update the value (or use the default for inserts) either don't include the field or do:

TodosCompanion(
  category: Value.absent(),
);

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by lsaudon
Comment options

You must be logged in to vote
1 reply
@simolus3
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants