stablekernel / aqueduct

Dart HTTP server framework for building REST APIs. Includes PostgreSQL ORM and OAuth2 provider.
https://aqueduct.io
BSD 2-Clause "Simplified" License
2.42k stars 280 forks source link

haveAtLeastOneWhere has been cleaned up in old versions. #915

Open nikpozdnyakov opened 3 years ago

nikpozdnyakov commented 3 years ago

encountered the need to filter the database query by child fields in the "to many" connection. I found it in the documentation:

var query = new Query<Team>(context)
  ..where((t) => t.players.haveAtLeastOneWhere.yearsPlayed).lessThanOrEqualTo(1);

var teamsWithRookies = await query.fetch();

but haveAtLeastOneWhere has been removed from the framework Is there any other way to do the same? and I'm not sure it's right to leave the removed functionality in the documentation.

rmomplet commented 3 years ago

same problem. Any suggestion?