agrestio / agrest

Server-side Java REST Framework for easy access to data graphs from various backends
https://agrest.io
Apache License 2.0
80 stars 34 forks source link

DeleteBuilder: byIds(..), byMultiIds(..) #658

Closed andrus closed 9 months ago

andrus commented 9 months ago

DeleteBuilder is the only one that supports multiple IDs. Yet its API implies that it only supports one id. byId(..)adds to the id collection, but you need to read the docs to realize that (in SelectBuilder and UpdateBuilder, byId(..) overrides previous ID selection). Need a clearer API:

// DeleteBuilder

// replaces previous IDs collection

DeleteBuilder<T> byIds(Object... ids)
DeleteBuilder<T> byIds(Collection<?> ids)