afterFind

14 views
Skip to first unread message

George

unread,
Apr 26, 2013, 11:24:23 AM4/26/13
to cfwh...@googlegroups.com
I'm confused about afterFind(), I want something that will only fire on a findOne (or findbykey()), I don't want it to fire on a findAll(). 

afterFind says it does both. How do I accomplish this?


Also, what I"m looking for is a methodology to turn a deserialize a json object saved in my DB (and serialize with a beforeSave()>

Andy Bellenie

unread,
Apr 26, 2013, 11:50:12 AM4/26/13
to ColdFusion on Wheels
Wrap the inside of the function in isInstance()


e.g.

<cffunction name="myAfterFind">
<cfif isInstance()>
 function code here
</cfif>
</cffunction.



--
You received this message because you are subscribed to the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cfwheels+u...@googlegroups.com.
To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Randall Meeker

unread,
Apr 26, 2013, 11:54:23 AM4/26/13
to cfwh...@googlegroups.com
thanks


--
You received this message because you are subscribed to a topic in the Google Groups "ColdFusion on Wheels" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cfwheels/KiE5Ol8DhvQ/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to cfwheels+u...@googlegroups.com.

To post to this group, send email to cfwh...@googlegroups.com.
Visit this group at http://groups.google.com/group/cfwheels?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Randall Meeker
Reply all
Reply to author
Forward
0 new messages