Doug I think you misunderstood me,

 

I want to be able to delete multiple records based on a query. Using the record object I get “Ambiguous Record” since delete(argumentCollection) will try to load the record and will find multiple records. When I asked for deleteByFields it was to be able to delete any records that match any provided argument. Even Better, could be to supply a query object. Something like this.

 

<cfset gtw = reactor.createGateway(“myobject”)>

<cfset query = gtw.createQuery()>

<cfset query.getWhere().isEqual(“myobject”,”firstfield”,someval)>

<cfset query.getWhere().isGt(“myObject”,”someotherField”,anotherval)>

<cfset gtw.deleteByQuery(query)>

 

 

 

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]


From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Hughes
Sent: segunda-feira, 20 de Fevereiro de 2006 17:29
To: [email protected]
Subject: RE: Reactor For CF [Spam] DeleteByFields

 

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/ -- Reactor for ColdFusion Mailing List -- [email protected] -- Archives at http://www.mail-archive.com/reactor%40doughughes.net/

Reply via email to