Created
March 23, 2011 11:52
-
-
Save neokoenig/882992 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!---Contact.cfc---> | |
<cfcomponent extends="Model" output="false"> | |
<cffunction name="init"> | |
<cfset property(name="createdBy", defaultValue=session.currentuser.id)> | |
<cfset property(name="updatedBy", defaultValue=session.currentuser.id)> | |
<cfset hasMany(name="emailaddresses", dependent="deleteAll")> | |
<cfset hasMany(name="categories", dependent="deleteAll")> | |
<cfset nestedProperties(associations="emailaddresses,categories", allowDelete=true)> | |
</cffunction> | |
</cfcomponent> | |
<!---EmailAddress.cfc---> | |
<cfcomponent extends="Model" output="false"> | |
<cffunction name="init"> | |
<cfset belongsTo("contact")> | |
</cffunction> | |
</cfcomponent> | |
<!---CategoryType.cfc---> | |
<cfcomponent extends="Model" output="false"> | |
<cffunction name="init"> | |
<cfset hasMany(name="categories")> | |
</cffunction> | |
</cfcomponent> | |
<!---Category.cfc---> | |
<cfcomponent extends="Model" output="false"> | |
<cffunction name="init"> | |
<cfset belongsTo("contact")> | |
<cfset belongsTo("categoryType")> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment