Or...

var args = arguments.event.getAllValues()
<cfset reactor.createRecord(“foobar”).delete(argumentCollection=args) />

That is, provided your event values match setters on a single record object. You may have to do a little processing on the event objects data, maybe use the MG or M2 event bean functionality and then do argumentCollection=MyBean.getInstance(), but the idea is there.


Basically the point is if you use argumentCollection it passes the struct in using key names to match up with argument names, so if your form field names match column names in the DB, they get used as part of the args and if a particular key DOESN'T match up with a DB column name, it should get ignored. Haven't tested it yet to see if it actually DOES get ignored or if it throws an error, but it should ignore it.


Laterz,

J


------------------------------------------------

Jared C. Rypka-Hauer

Continuum Media Group LLC

http://www.web-relevant.com

Member, Team Macromedia - ColdFusion


"That which does not kill me makes me stranger." - Yonah Schmeidler


On Feb 20, 2006, at 11:28 AM, Doug Hughes wrote:

João – Already exists:  <cfset reactor.createRecord(“foobar”).delete(field=value,otherfield=othervalue) />

 

Doug

 


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] On Behalf Of João Fernandes
Sent: Monday, February 20, 2006 11:00 AM
To: [email protected]
Subject: Reactor For CF [Spam] DeleteByFields

 

Hi there,

 

I came across this, if I want to delete several items from any table based on different columns values I have to create a record for each item and then delete().

What do you think of a deleteByFields or deleteByQuery in the gateway?

 

João Fernandes
Sistemas de Informação

Programador Informático
Cofina media

Avenida João Crisóstomo, Nº 72 . 1069-043 Lisboa PORTUGAL
Tel (+351) 213 185 200 . Fax (+351) 213 540 370
[EMAIL PROTECTED]

 

-- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to