Customizing content classes
Each class you define in the Ontology module results in C# class files in the folder "Models/WAF". The class is marked as "partial" and the class is defined by two files, one under "Models/WAF" and one under "Models/WAF_Custom". The file under "Models/WAF" is maintained by the system and overritten on each rebuild. The file under "Models/WAF_Custom" is only created once and never overritten. In this file you can override various methods and propeties to change the behaviour of the class. Typically you can override the method "OnAfterUpdate" if you want to trigger other actions each time the content is changed.
This possibility to ovveride methods and interact with content events applies to both classes that inherit from the base class "ContentBase" and "InnerContentBase". Please note that the functionality is not enabled by default on inner contents (for performance reasons). To override events on Inner Contents, you must first override a property called "virtual bool InvokeInnerContentsEventMethods" and let it return true on the root content class the inner content is related to.