cayenne-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrus Adamchik <and...@objectstyle.org>
Subject Re: Interfaces for domain objects?
Date Wed, 13 May 2009 17:19:14 GMT

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

Mime
View raw message