withMax abstract method
Load relationship maximum aggregates without loading the full relationships.
Adds a {relation}{Column}Max attribute to each model.
final users = await User.query()
.withMax('posts', 'views')
.get();
print(users.first.postsViewsMax); // 50000
Implementation
QueryBuilderInterface<T> withMax(String relation, String column);