users@glassfish.java.net

Re: JPA: how to alter relation without fetching entire entities?

From: <glassfish_at_javadesktop.org>
Date: Tue, 22 May 2007 14:51:10 PDT

You can prefetch Persons for those Addresses that you need to delete if you do WHERE AddressId IN(x, y, z, ...). Then you won't go to the database for any more selects, and if a provider supports batching, all the updates will not take too long.

But yes, there is no easy way to do it in a single step.
[Message sent by forum member 'mvatkina' (mvatkina)]

http://forums.java.net/jive/thread.jspa?messageID=218424