adonis 5 computed column on pivot-table

263 Views Asked by At

I understand we can add additional columns on pivot tables when using manyToMany decorator on a lucid model:

@manyToMany(() => Skill, {
 pivotColumns: ['proficiency'],
})
public skills: ManyToMany<typeof Skill>

I wanted to know if it is possible to make those additional columns (like proficency in the above code) a computed column, we do that with @computed() decorator when we are defining a common lucid model column, if it's possible, how can I do it?

thank you

0

There are 0 best solutions below