PageRenderTime 124ms CodeModel.GetById 0ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, CPL-1.0
  1. <cfcomponent extends="Model">
  2. <cffunction name="init">
  3. <cfset belongsTo("author")>
  4. <cfset hasMany("comments")>
  5. <cfset hasMany("classifications")>
  6. </cffunction>
  7. <cffunction name="afterFindCallback">
  8. <cfif StructIsEmpty(arguments)>
  9. <cfset this.title = "setTitle">
  10. <cfset this.views = this.views + 100>
  11. <cfset this.something = "hello world">
  12. <cfelse>
  13. <cfset arguments.title = "setTitle">
  14. <cfset arguments.views = arguments.views + 100>
  15. <cfset arguments.something = "hello world">
  16. <cfreturn arguments>
  17. </cfif>
  18. </cffunction>
  19. </cfcomponent>