On 7/7/06, Dan Vega <[EMAIL PROTECTED]> wrote:
<cfif form.userId NEQ "0">
<!--- this lets us know we are updating an existing record, if 0 add
new record --->
<cfset application.UserRecord.setUserId(form.UserId
)>
<cfelse>
<cfset application.UserRecord.setUserId()>
<cfset application.UserRecord.setUserId(0)>
</cfif>
However, as others have pointed out, you should not put transient
objects in application scope.
Application scope is for services and things that have no state (i.e.,
don't change over time - except for caching). A UserRecord is, by
definition, a stateful object. If you create a fresh UserRecord object
for each request, you'll be just fine.
--
Sean A Corfield -- http://corfield.org/
Got frameworks?
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Reactor for ColdFusion Mailing List
[email protected]
Archives at: http://www.mail-archive.com/reactor%40doughughes.net/
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --