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
This archive was generated by hypermail 2.0.0 : Wed May 13 2009 - 13:19:48 EDT