{"__v":19,"_id":"550974cc368a561700414760","api":{"auth":"required","params":[],"results":{"codes":[]},"url":""},"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Association Functions\"\n}\n[/block]\n* [belongsTo()](doc:belongsto)\n* [hasMany()](doc:hasmany)\n* [hasOne()](doc:hasone)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Callback Functions\"\n}\n[/block]\n* [afterCreate()](doc:aftercreate)\n* [afterDelete()](doc:afterdelete)\n* [afterFind()](doc:afterfind)\n* [afterInitialization()](doc:afterinitialization)\n* [afterNew()](doc:afternew)\n* [afterSave()](doc:aftersave)\n* [afterUpdate()](doc:afterupdate)\n* [afterValidation()](doc:aftervalidation)\n* [afterValidationOnCreate()](doc:aftervalidationoncreate)\n* [afterValidationOnUpdate()](doc:aftervalidationonupdate)\n* [beforeCreate()](doc:beforecreate)\n* [beforeDelete()](doc:beforedelete)\n* [beforeSave()](doc:beforesave)\n* [beforeUpdate()](doc:beforeupdate)\n* [beforeValidation()](doc:beforevalidation)\n* [beforeValidationOnCreate()](doc:beforevalidationoncreate)\n* [beforeValidationOnUpdate()](doc:beforevalidationonupdate)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Miscellaneous Functions\"\n}\n[/block]\n* [accessibleProperties()](doc:accessibleproperties)\n* [dataSource()](doc:datasource)\n* [nestedProperties()](doc:nestedproperties) \n* [property()](doc:property)\n* [protectedProperties()](doc:protectedproperties)\n* [setPrimaryKey()](doc:setprimarykey)\n* [setPrimaryKeys()](doc:setprimarykeys)\n* [setTableNamePrefix()](doc:settablenameprefix)\n* [table()](doc:table)\n[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Validation Functions\"\n}\n[/block]\n* [automaticValidations()](doc:automaticvalidations)\n* [validate()](doc:validate)\n* [validateOnCreate()](doc:validateoncreate)\n* [validateOnUpdate()](doc:validateonupdate)\n* [validatesConfirmationOf()](doc:validatesconfirmationof)\n* [validatesExclusionOf()](doc:validatesexclusionof)\n* [validatesFormatOf()](doc:validatesformatof)\n* [validatesInclusionOf()](doc:validatesinclusionof)\n* [validatesLengthOf()](doc:validateslengthof)\n* [validatesNumericalityOf()](doc:validatesnumericalityof)\n* [validatesPresenceOf()](doc:validatespresenceof)\n* [validatesUniquenessOf()](doc:validatesuniquenessof)","category":"550974cc368a561700414758","createdAt":"2015-03-18T12:27:00.432Z","excerpt":"These methods are called from the `init()` methods of your model files.","githubsync":"","hidden":false,"isReference":true,"link_external":false,"link_url":"","order":0,"parentDoc":null,"project":"55070e814bb83b2500ec9404","slug":"model-initialization-functions","sync_unique":"","title":"Model Initialization Functions","type":"basic","updates":[],"user":"55070d24d30b3f190011b941","version":"550974cb368a561700414757","childrenPages":[]}

Model Initialization Functions

These methods are called from the `init()` methods of your model files.

[block:api-header] { "type": "basic", "title": "Association Functions" } [/block] * [belongsTo()](doc:belongsto) * [hasMany()](doc:hasmany) * [hasOne()](doc:hasone) [block:api-header] { "type": "basic", "title": "Callback Functions" } [/block] * [afterCreate()](doc:aftercreate) * [afterDelete()](doc:afterdelete) * [afterFind()](doc:afterfind) * [afterInitialization()](doc:afterinitialization) * [afterNew()](doc:afternew) * [afterSave()](doc:aftersave) * [afterUpdate()](doc:afterupdate) * [afterValidation()](doc:aftervalidation) * [afterValidationOnCreate()](doc:aftervalidationoncreate) * [afterValidationOnUpdate()](doc:aftervalidationonupdate) * [beforeCreate()](doc:beforecreate) * [beforeDelete()](doc:beforedelete) * [beforeSave()](doc:beforesave) * [beforeUpdate()](doc:beforeupdate) * [beforeValidation()](doc:beforevalidation) * [beforeValidationOnCreate()](doc:beforevalidationoncreate) * [beforeValidationOnUpdate()](doc:beforevalidationonupdate) [block:api-header] { "type": "basic", "title": "Miscellaneous Functions" } [/block] * [accessibleProperties()](doc:accessibleproperties) * [dataSource()](doc:datasource) * [nestedProperties()](doc:nestedproperties) * [property()](doc:property) * [protectedProperties()](doc:protectedproperties) * [setPrimaryKey()](doc:setprimarykey) * [setPrimaryKeys()](doc:setprimarykeys) * [setTableNamePrefix()](doc:settablenameprefix) * [table()](doc:table) [block:api-header] { "type": "basic", "title": "Validation Functions" } [/block] * [automaticValidations()](doc:automaticvalidations) * [validate()](doc:validate) * [validateOnCreate()](doc:validateoncreate) * [validateOnUpdate()](doc:validateonupdate) * [validatesConfirmationOf()](doc:validatesconfirmationof) * [validatesExclusionOf()](doc:validatesexclusionof) * [validatesFormatOf()](doc:validatesformatof) * [validatesInclusionOf()](doc:validatesinclusionof) * [validatesLengthOf()](doc:validateslengthof) * [validatesNumericalityOf()](doc:validatesnumericalityof) * [validatesPresenceOf()](doc:validatespresenceof) * [validatesUniquenessOf()](doc:validatesuniquenessof)