• 首页
  • 产品中心
    • 数式Oinone四大产品

      低代码开发平台无代码开发平台集成开发平台AI大模型开发
    • 数式Oinone体系能力

      用户与组织权限管理文件管理消息中心国际化业务审计
    • 数式Oinone核心产品特性

      低无一体面向软件公司场景无限制应用级扩容可分可合
  • 服务中心
    • 客户服务

      预约演示方案咨询私有部署找人定制
    • 开发者

      问答下载
    • Oinone学院

      社区学习

    《精讲面向软件公司的低代码平台——以Oinone为例》

  • 合作伙伴
    渠道申请伙伴名录专家库
  • 关于数式
0571-88757863

Meta Directive API


The meta directive system issues corresponding instructions to the function processing flow by performing bitwise AND marking on the directive fields of the request context. The system mainly includes two types of instructions: request context directives and data directives.

I. Data Directives

Most data directives are system kernel directives, which are usually not required in business development, so they are not described in detail here. The system kernel has reserved the first 20 bits.

II. Request Context Directives

Request context directives are set through the non-persistent META_BIT attribute in the session context. The specific directives are as follows:

BitDirectiveDirective NameFrontend DefaultBackend DefaultDescriptionCorresponding Operations
20builtActionBuilt-in ActionNoNoDetermine if it is a platform-built server action
PamirsSession.directive().disableBuiltAction();
PamirsSession.directive().enableBuiltAction();
21unlockDisable Optimistic LockNoNoThe system default enables the optimistic lock for models with optimistic locks, and this directive controls its switch
PamirsSession.directive().enableOptimisticLocker();
PamirsSession.directive().disableOptimisticLocker();
22checkData ValidationYesNoThe system backend operations do not perform data validation by default, and it takes effect after marking
PamirsSession.directive().enableCheck();
PamirsSession.directive().disableCheck();
23defaultValueDefault Value CalculationYesNoControl whether to automatically fill in default values
PamirsSession.directive().enableDefaultValue();
PamirsSession.directive().disableDefaultValue();
24extPointExecute Extension PointsYesNoFrontend requests execute extension points by default and can be marked to ignore; programmatic calls to the data manager in the backend do not execute extension points by default
PamirsSession.directive().enableExtPoint();
PamirsSession.directive().disableExtPoint();
25hookInterceptionYesNoControl whether to perform function call interception
PamirsSession.directive().enableHook();
PamirsSession.directive().disableHook();
26authenticateAuthenticationYesNoThe system performs permission verification and filtering by default, and enables permission verification after marking
PamirsSession.directive().sudo();
PamirsSession.directive().disableSudo();
27ormColumnORM Field AliasNoNoSystem directive, setting is prohibitedNone
28usePkStrategyUse PK StrategyYesNoDetermine the persistence strategy of addition or update according to whether the PK is empty
PamirsSession.directive().enableUsePkStrategy();
PamirsSession.directive().disableUsePkStrategy();
29fromClientClient CallYesNoDetermine if it is a client (frontend) call
PamirsSession.directive().enableFromClient();
PamirsSession.directive().disableFromClient();
30syncExecute Function SynchronouslyNoNoForce asynchronous execution of functions to execute synchronously (only valid for Spring Beans)None
31ignoreFunManagementIgnore Function ManagementNoNoIgnore function manager processing to avoid repeated interception of Spring calls
PamirsSession.directive().enableIgnoreFunManagement();
PamirsSession.directive().disableIgnoreFunManagement();

III. Meta Directive Usage Modes

(Ⅰ) Normal Mode

PamirsSession.directive().disableOptimisticLocker();
try {
    // Update logic
} finally {
    PamirsSession.directive().enableOptimisticLocker();
}

(Ⅱ) Batch Setting Mode

Models.directive().run(() -> { /* Add logic here */}, SystemDirectiveEnum.AUTHENTICATE);
Edit this page
Last Updated:1/15/26, 4:02 AM
Prev
Request Context API
Next
Hint API
默认页脚
Copyright © 2026 Mr.Hope