vapor / fluent

Vapor ORM (queries, models, and relations) for NoSQL and SQL databases
https://docs.vapor.codes/4.0/fluent/overview/
MIT License
1.32k stars 172 forks source link

Nested eager loading with deleted #712

Open pencasolutions opened 3 years ago

pencasolutions commented 3 years ago

Is your feature request related to a problem? Please describe. Currently we cannot use a .withDeleted() on a nested eager load, this is causing an issue when trying to account for soft deleted items within a relationship.

Describe the solution you'd like Something similar to: Item1.query(on: req.db) .withSoftDeletesIncluded(\.$model) Item1.query(on: req.db) .withDeleted(\.$model)

Describe alternatives you've considered Currently I query separately rather than nesting so I can include soft deletes.