JetBrains / Exposed

Kotlin SQL Framework
http://jetbrains.github.io/Exposed/
Apache License 2.0
8.33k stars 694 forks source link

Constraining Eager Loads #651

Open VeselyJan92 opened 5 years ago

VeselyJan92 commented 5 years ago

Is there a way to put constraint on Eagerly Loaded relationships?

I would really appreatice if there was a some way to do this as it is in Laravel/Eloquent:

$users = App\User::with(['posts' => function ($query) {
    $query->where('title', 'like', '%first%');
}])->get();

https://laravel.com/docs/5.8/eloquent-relationships#constraining-eager-loads

tomperi-nr commented 3 years ago

I would really like to see that feature as well :)