Skip to content

Instantly share code, notes, and snippets.

View andybellenie's full-sized avatar

Andrew Bellenie andybellenie

View GitHub Profile
@andybellenie
andybellenie / association.cfm
Created May 23, 2012 12:11 — forked from KrunchMuffin/association.cfm
cfwheels association help
<!--- pet model --->
<cfcomponent extends="Model" output="false">
<cffunction name="init" output="false" access="public">
<!--- relationships --->
<cfset hasOne(name="petProfile", jointType="outer")>
<cfset hasMany(name="petDocuments", dependent="deleteAll", jointType="outer")>
<cfset belongsTo(name="personPet")>
<cfset hasMany(name="petEvents", dependent="deleteAll", jointType="outer")>
<cfset hasMany(name="ViewPetEvents", foreignkey="petid", jointType="outer")>