|
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 Programador
Informático From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Doug Hughes 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 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 Programador
Informático |

