Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

adonis many to many

@manyToMany(() => Skill, {
  localKey: 'id',
  pivotForeignKey: 'user_id',
  relatedKey: 'id',
  pivotRelatedForeignKey: 'skill_id',
})
public skills: ManyToMany<typeof Skill>
Source by docs.adonisjs.com #
 
PREVIOUS NEXT
Tagged: #adonis
ADD COMMENT
Topic
Name
9+4 =