Skip to content

How to set custom fields? #3018

Answered by michaelbromley
meatandfat asked this question in Q&A
Discussion options

You must be logged in to vote

Hi! The way I normally do it is like this:

await this.connection.getRepository(ctx, Product).save(new Product({
  enabled: true,
  customFields: {
    brandId: brandId,
  }
}));

Replies: 1 comment 1 reply

Comment options

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

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