Skip to content

Vararg overloads for the WriteSet actions #273

Description

@zantvoort

The write-set actions take Iterable<? extends Entity<?>>, so the canonical call shape for a handful of individually named, mixed-type entities carries ceremony:

orm.writeSet().insert(List.of(wolfie, rex, visit));

Write sets are the one API whose defining usage names a few roots inline, so vararg overloads fit here:

orm.writeSet().insert(wolfie, rex, visit);

Scope:

  • Vararg default overloads for all seven actions (insert, insertAndFetch, update, updateAndFetch, upsert, upsertAndFetch, remove), delegating to the Iterable forms. Entity<?> is reifiable, so the overloads are warning-free without @SafeVarargs.
  • The Iterable forms stay canonical and unchanged; single-entity and typed single-root overloads keep winning one-argument resolution in both Java and Kotlin.
  • Documentation call sites in the write-sets reference move to the vararg shape where they enumerate entities inline.

The docs pages added in #272 already show the vararg shape and depend on this landing before the 1.13.0 release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions