Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typeorm set relation

// typeorm set relation (One-To-One-Relation)
// "Video" is the main table
// "channel" is the relation variable
await connection.createQueryBuilder()
  .relation(Video, "channel")
  .of(Number(id)) // video id
  .set(Number(channelId))
 
PREVIOUS NEXT
Tagged: #typeorm #set #relation
ADD COMMENT
Topic
Name
1+5 =