Return-Path: Delivered-To: apmail-cayenne-user-archive@www.apache.org Received: (qmail 99343 invoked from network); 13 May 2009 17:19:44 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 May 2009 17:19:44 -0000 Received: (qmail 62714 invoked by uid 500); 13 May 2009 17:19:44 -0000 Delivered-To: apmail-cayenne-user-archive@cayenne.apache.org Received: (qmail 62701 invoked by uid 500); 13 May 2009 17:19:44 -0000 Mailing-List: contact user-help@cayenne.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cayenne.apache.org Delivered-To: mailing list user@cayenne.apache.org Received: (qmail 62691 invoked by uid 99); 13 May 2009 17:19:44 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 May 2009 17:19:44 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [208.78.103.231] (HELO vorsha.objectstyle.org) (208.78.103.231) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 13 May 2009 17:19:36 +0000 Received: (qmail 7987 invoked from network); 13 May 2009 17:19:15 -0000 Received: from unknown (HELO ?IPv6:::1?) (127.0.0.1) by localhost with SMTP; 13 May 2009 17:19:15 -0000 Message-Id: From: Andrus Adamchik To: user@cayenne.apache.org In-Reply-To: <20090512101102.AA38.60BA733C@jeremias-maerki.ch> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: Re: Interfaces for domain objects? Date: Wed, 13 May 2009 13:19:14 -0400 References: <20090512101102.AA38.60BA733C@jeremias-maerki.ch> X-Mailer: Apple Mail (2.935.3) X-Virus-Checked: Checked by ClamAV on apache.org On May 12, 2009, at 4:40 AM, Jeremias Maerki wrote: > While I'm at it: Can I ask why DeleteQuery has been deprecated? I'd > rather use that instead of EJBQLQuery. Not having to concatenate > strings > to build queries is one of the features that makes Cayenne appeal to > me > so much. I've had stuff like that back in my Delphi times and I liked > that very much. The problem with DeleteQuery (or EJBQL delete for that matter) is that it didn't clean up in-memory objects that were deleted in the DB. So the feeling was that it is conceptually wrong as a public user API. The preferred way is get a hold of an object and do context.deleteObject(..). Of course the need for a batch delete operation doesn't completely go away with the above. I guess we may need to work on getting it right as a part of the planned post 3.0 effort to merge redundant queries together and provide them all with a non-String OO creation interface. Andrus