fluent-kit icon indicating copy to clipboard operation
fluent-kit copied to clipboard

Eager-load filtering

Open brycesteve opened this issue 5 years ago • 5 comments

When using eager loading, all relations are loaded. It would be useful, especially with a large number of relations, to be able to filter the returned relations. Perhaps something like this:

SomeModel.query(on: database)
    .with(\.$childModel) {
        $0.filter(\.$childProperty == "someValue")
    }
    .all()

brycesteve avatar Apr 02 '20 15:04 brycesteve

Any update on this? Would so love to have this. Thank you!

AirZona avatar Dec 01 '21 00:12 AirZona

shameless bump

wibed avatar Jan 24 '22 09:01 wibed

This hasn't been approached yet. If someone wants to pick it up that would be awesome but it's likely to be bumped to the Fluent 5 feature list

0xTim avatar Jan 25 '22 18:01 0xTim

Plus one to this! Just came across this issue when I was looking to do something similar

mikaelacaron avatar May 02 '24 04:05 mikaelacaron

up ⬆️

RobertKoval avatar May 11 '24 14:05 RobertKoval