Add TreeModel and HasSubtree implementation
This commit is contained in:
@@ -59,7 +59,7 @@ export abstract class HasOneOrMany<T extends Model<T>, T2 extends Model<T2>, V e
|
||||
public applyScope(where: AbstractBuilder<T2>): void {
|
||||
where.where(subq => {
|
||||
subq.where(this.qualifiedForeignKey, '=', this.parentValue)
|
||||
.whereRaw(this.qualifiedForeignKey, 'IS NOT', 'NULL')
|
||||
.whereNotNull(this.qualifiedForeignKey)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user