Skip to content
⚠️ This is a fork of lrstanley/entrest with additional features. For the official documentation, visit lrstanley.github.io/entrest.

Fork Changelog

This changelog documents changes made in the Accelleran fork of entrest. For upstream changes, see the official entrest releases.

Version Format

Fork versions follow the pattern: v{FORK_MAJOR}.{FORK_MINOR}.{FORK_PATCH}+upstream.{UPSTREAM_VERSION}

Example: v1.0.0+upstream.1.0.1 means fork version 1.0.0 based on upstream version 1.0.1.

Note: Tags without the +upstream. suffix (e.g., v1.0.2, v1.0.1) are upstream releases from lrstanley/entrest, not fork releases.


[Unreleased]

No unreleased changes.

[v1.1.2+upstream.1.0.2] - 2025-12-09

Based on upstream entrest v1.0.2.

Fixed

  • Edges now inherit operations from parent entity - When an entity has operations configured via WithIncludeOperations (e.g., OperationUpsert), its edges now automatically participate in those operations without requiring explicit annotations on each edge. The inheritance order is: edge's explicit operations → parent entity's operations → global defaults. This fixes the issue where enabling OperationUpsert on a singleton entity would still require annotating each edge separately.
  • JSON tag handling preserves existing options - The internal patchJSONTag function now properly removes only the omitempty option from JSON tags while preserving other tag options and metadata, rather than replacing the entire struct tag

[v1.1.1+upstream.1.0.2] - 2025-11-24

Based on upstream entrest v1.0.2.

Fixed

  • Edges without backing fields now included in Upsert/Replace params - Edges marked with WithIncludeOperations(OperationUpsert) or WithIncludeOperations(OperationCreateOrReplace) are now properly included in the generated parameter structs, even when they don't have explicit backing fields defined with .Field(). Previously, these edges were silently excluded, making it impossible to set required edges during upsert/replace operations.
  • Non-unique edges now replace instead of append in Upsert/Replace - M2M and O2M relationships now correctly replace existing edge connections instead of appending to them, matching proper PUT semantics:
    • Upsert (partial update): {"pets": [3, 4]} replaces with [3, 4], {"pets": []} clears all, omitting pets preserves existing
    • Replace (full replacement): {"pets": [3, 4]} replaces with [3, 4], {"pets": []} or omitted clears all
    • Previously, providing edge IDs would append to existing relationships (e.g., [1, 2] + [3, 4] = [1, 2, 3, 4]), which violated REST PUT semantics

[v1.1.0+upstream.1.0.2] - 2025-11-13

Based on upstream entrest v1.0.2.

Added

  • Upsert operation (OperationUpsert) - PUT endpoint with partial update semantics (preserves unprovided optional fields)
  • Create-or-Replace operation (OperationCreateOrReplace) - PUT endpoint with full replacement semantics (clears unprovided optional fields)
  • Subentities (docs) - Schemas accessible only through parent edges, without top-level REST endpoints (useful for dependent/nested data like status objects, metadata, or configuration)
  • WrapUnpagedResults config option (docs) - Return objects instead of arrays for unpaged list operations

Fixed

  • Eager loading now works for schemas with no operations configured
  • WithExcludeOperations now properly excludes operations from configured defaults
  • Non-paginated list operations now return correct pointer types (related to WrapUnpagedResults)
  • List endpoint response descriptions now use properly pluralized entity names

[v1.0.0+upstream.1.0.1] - 2024

Based on upstream entrest v1.0.1.

Added

  • Initial fork release