PageRenderTime 84ms CodeModel.GetById 81ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/wheels/tests/_assets/models/Post.cfc

http://cfwheels.googlecode.com/
ColdFusion CFScript | 22 lines | 19 code | 3 blank | 0 comment | 0 complexity | 168d94d8680ef24be32d252c77d8fd1c MD5 | raw file
 1<cfcomponent extends="Model">
 2
 3	<cffunction name="init">
 4		<cfset belongsTo("author")>
 5		<cfset hasMany("comments")>
 6		<cfset hasMany("classifications")>
 7	</cffunction>
 8
 9	<cffunction name="afterFindCallback">
10		<cfif StructIsEmpty(arguments)>
11			<cfset this.title = "setTitle">
12			<cfset this.views = this.views + 100>
13			<cfset this.something = "hello world">
14		<cfelse>
15			<cfset arguments.title = "setTitle">
16			<cfset arguments.views = arguments.views + 100>
17			<cfset arguments.something = "hello world">
18			<cfreturn arguments>
19		</cfif>
20	</cffunction>
21
22</cfcomponent>