Skip to content

Add DatabaseObjectBuilder with TagBuilder implementation#6689

Draft
BurntimeX wants to merge 17 commits into
6.3from
63-dbo-builder
Draft

Add DatabaseObjectBuilder with TagBuilder implementation#6689
BurntimeX wants to merge 17 commits into
6.3from
63-dbo-builder

Conversation

@BurntimeX

Copy link
Copy Markdown
Member

Introduces an abstract builder for creating, updating and deleting database objects with a fluent setter API, batched transactional deletes and an INSERT IGNORE-style helper. TagBuilder is the first concrete implementation.

Introduces an abstract builder for creating, updating and deleting database objects with a fluent setter API, batched transactional deletes and an `INSERT IGNORE`-style helper. `TagBuilder` is the first concrete implementation.
Comment thread wcfsetup/install/files/lib/data/tag/TagBuilder.class.php Outdated
Comment thread wcfsetup/install/files/lib/data/DatabaseObjectBuilder.class.php Outdated
Comment thread wcfsetup/install/files/lib/data/DatabaseObjectBuilder.class.php Outdated
Comment thread wcfsetup/install/files/lib/data/DatabaseObjectBuilder.class.php Outdated
BurntimeX added 16 commits June 25, 2026 19:51
Replace the `TagAction`-based persistence in `TagAddForm`/`TagEditForm` with the new `DatabaseObjectBuilder` flow.
Introduce a counterpart to `saveValueCallback()` that loads a field's value from an `IStorableObject` when an edit form is populated. When set, the callback takes precedence over the default property-based loading in `updatedObject()`, allowing values that must be derived from a related object or an additional query.
Provides a static helper to atomically increment or decrement counter columns for a given object, mirroring the behavior of the legacy `DatabaseObjectEditor::updateCounters()`.
The method was based on `DatabaseObjectEditor::fastCreate()` which is used very rarely and therefore is not needed in the new API.

The change simplifies the code and allows the DBO to be passed directly as a parameter to `afterCreate()` and `afterUpdate()`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants