Return to v1.4.5 docs

afterFind()



Registers method(s) that should be called after an existing object has been initialized (which is usually done with the findByKey or findOne method).

Name Type Required Default Description
methods string No See documentation for afterNew.
<!--- Instruct CFWheels to call the `setTime` method after getting objects or records with one of the finder methods --->
<cffunction name="init">
	<cfset afterFind("setTime")>
</cffunction>

<cffunction name="setTime">
	<cfset arguments.fetchedAt = Now()>
	<cfreturn arguments>
</cffunction>