Is there any way to create a two foreign key relation in Objection.js. Something like following:
static get relationMappings() {
return {
childs: {
relation: Model.HasManyRelation,
modelClass: childModel,
join: {
from: 'parent.id',
to: 'child.parent_id'
},
join: { // Another foreign key
from: 'parent.record_id',
to: 'child.parent_record_id'
}
}
}
}