[Opensource] usage of DBObject.delete() (4.02)

Mike Traum mtraum at cirnetwork.org
Thu Sep 12 11:36:35 PDT 2002


I see. I assume this javadoc is in 4.1 because it is not in 4.02. I'll bring
that up in a new message because it opens many concerns about expresso
development that I have...

Thanks,
Mike

-----Original Message-----
From: opensource-admin at jcorporate.com
[mailto:opensource-admin at jcorporate.com]On Behalf Of larry hamel
Sent: Wednesday, September 11, 2002 11:26 PM
To: opensource at jcorporate.com
Subject: Re: [Opensource] usage of DBObject.delete() (4.02)


you want "deleteAll()"

the javadoc for delete() already specifically mentions as that the key for
the object is use:

     * Delete this record from the target table. The current field values
for the key
     * of this object tell us which record to delete. This default version
     * of delete also deletes associated detail records (e.g. performs a
     * "cascading delete" of details.

I added the following ref:

         *
         * @see DeleteAll to delete objects identified by non-key fields


why?  I suppose the reason is that the SQL statement using just the keys is
very small and efficient.  Using the values of all fields is relatively
expensive.

larry

At 03:04 PM 9/11/2002, you wrote:
>I would have guessed that setting any field for a DBObject and then doing a
.delete() would generate a where clause from the set fields and do the
delete. It appears, though, that it only takes key fields into account.
>
>Is this intentional? Can we get this added to the javadocs for delete()?
Also, why?
>
>Thanks,
>Mike
>

_______________________________________________
Opensource mailing list
Opensource at jcorporate.com
http://mail.jcorporate.com/mailman/listinfo/opensource
Archives: http://mail.jcorporate.com/pipermail/opensource/




More information about the Opensource mailing list