Versionen im Vergleich

Schlüssel

  • Diese Zeile wurde hinzugefügt.
  • Diese Zeile wurde entfernt.
  • Formatierung wurde geändert.
Auszug
hiddentrue

Nuclos SaveFlags: SaveFlag.PATCH and SaveFlag.SKIP_RULES on update in rules, load attributes restricted, load version, performance.

globe with meridians Language: Deutsch · English

open book SaveFlags

Control saving: write individual attributes with SaveFlag.PATCH and skip update rules with SKIP_RULES.

Status
colourGrey
titleReferenz
Status
colourBlue
titleDeveloper
Status
colourGreen
titleUpdated: Jul 2026
Status
colourGrey
titleapplies to Nuclos 4.2026.x

Panel
bgColor#F4F5F7

On this page

Inhalt
maxLevel2
minLevel2

SaveFlags on update

From Nuclos 4.2024.19, SaveFlags can be passed when updating a BO in rules:

SaveFlagEffectsince
SaveFlag.SKIP_RULESprevents subsequent update rules (final rules still run)4.2024.19
SaveFlag.PATCHwrite individual attributes without loading all of them4.2024.21

Example

Previously the whole record was loaded and saved:

Codeblock
languagejava
Article article = Article.get(articleId);
article.setPrice(BigDecimal.valueOf(7.99));
article.save();

Since 4.2023.33 records can be loaded restricted to certain attributes. When saving, the PATCH flag is then required – and the version must be loaded too:

Codeblock
languagejava
// nur bestimmte Attribute laden (inkl. Version) und patchen
Article article = Article.get(articleId, Article.Price, Article.Version);
article.setPrice(BigDecimal.valueOf(7.99));
article.save(SaveFlag.PATCH, SaveFlag.SKIP_RULES);
Tipp
titleRecommendation

Also use SKIP_RULES so no unwanted update rules are triggered.

Related pages

open book Server-side rules


Saving in rules.

Open →

gear Selectively disabling rule execution


Suppress rules.

Open →