/wheels/tests/_assets/models/Post.cfc
ColdFusion CFScript | 22 lines | 19 code | 3 blank | 0 comment | 0 complexity | 168d94d8680ef24be32d252c77d8fd1c MD5 | raw file
Possible License(s): Apache-2.0, CPL-1.0
- <cfcomponent extends="Model">
-
- <cffunction name="init">
- <cfset belongsTo("author")>
- <cfset hasMany("comments")>
- <cfset hasMany("classifications")>
- </cffunction>
-
- <cffunction name="afterFindCallback">
- <cfif StructIsEmpty(arguments)>
- <cfset this.title = "setTitle">
- <cfset this.views = this.views + 100>
- <cfset this.something = "hello world">
- <cfelse>
- <cfset arguments.title = "setTitle">
- <cfset arguments.views = arguments.views + 100>
- <cfset arguments.something = "hello world">
- <cfreturn arguments>
- </cfif>
- </cffunction>
-
- </cfcomponent>