zoukankan      html  css  js  c++  java
  • phalcon:model 事件与事件管理器

    事件与事件管理器(Events and Events Manager)

    Models allow you to implement events that will be thrown when performing an insert/update/delete. They help define business rules for a certain model. The following are the events supported by PhalconMvcModel and their order of execution:

    OperationNameCan stop operation?Explanation
    Inserting/Updating beforeValidation YES Is executed before the fields are validated for not nulls/empty strings or foreign keys
    Inserting beforeValidationOnCreate YES Is executed before the fields are validated for not nulls/empty strings or foreign keys when an insertion operation is being made
    Updating beforeValidationOnUpdate YES Is executed before the fields are validated for not nulls/empty strings or foreign keys when an updating operation is being made
    Inserting/Updating onValidationFails YES (already stopped) Is executed after an integrity validator fails
    Inserting afterValidationOnCreate YES Is executed after the fields are validated for not nulls/empty strings or foreign keys when an insertion operation is being made
    Updating afterValidationOnUpdate YES Is executed after the fields are validated for not nulls/empty strings or foreign keys when an updating operation is being made
    Inserting/Updating afterValidation YES Is executed after the fields are validated for not nulls/empty strings or foreign keys
    Inserting/Updating beforeSave YES Runs before the required operation over the database system
    Updating beforeUpdate YES Runs before the required operation over the database system only when an updating operation is being made
    Inserting beforeCreate YES Runs before the required operation over the database system only when an inserting operation is being made
    Updating afterUpdate NO Runs after the required operation over the database system only when an updating operation is being made
    Inserting afterCreate NO Runs after the required operation over the database system only when an inserting operation is being made
    Inserting/Updating afterSave NO Runs after the required operation over the database system
  • 相关阅读:
    GoldenGate HANDLECOLLISIONS参数使用说明
    GoldenGate for bigdata 12.3.2.1版本新特性
    使用GoldenGate EVENTACTIONS执行数据的实时触发和定制化
    基于Docker的GoldenGate部署
    Redis热点数据预写方案
    Redis缓存和数据库双写一致方案
    Redis主从复制原理和高可用方案
    Redis的并发竞争如何解决?如何保证并发写的有序?
    Redis 的单线程模型
    Nginx系列之6:重要模块
  • 原文地址:https://www.cnblogs.com/achengmu/p/5879708.html
Copyright © 2011-2022 走看看