Closed kaushal-aubie closed 1 year ago
Does objection has HasManyRelation through relation, I wanted something like this
users: { relation: Model.HasManyRelation, // hasManyThorugh needed modelClass: User, join: { from: 'marksheets.id', through: { modelClass: MarksheetMember, from: 'marksheetMembers.marksheetid', to: 'marksheetMembers.userId', }, to: 'users.id', }, },
Otherwise, i have to
await db.Marksheet.query().findById(marksheetId).withGraphFetched('users.user') // if it is not through relation
HasManyThrough is a ManyToMany Relation, you could just use ManyToMany
HasManyThrough
ManyToMany
Does objection has HasManyRelation through relation, I wanted something like this
Otherwise, i have to