Hi, Tom
Thanks for the info.
I think I can iterate through each record and delete one by one, but
the performance is a big concern.
Are there other options? I'm a JPA beginner so I would really
appreciate it if you could elaborate.
On 10/13/2011 11:44 PM, Tom Ware wrote:
Hi,
From the JPA spec:
"A delete operation only applies to entities of the specified
class and its subclasses. It does not cascade to
related entities."
And:
"Bulk update maps directly to a database update operation,
bypassing optimistic locking checks. Portable
applications must manually update the value of the version column,
if desired, and/or manually validate
the value of the version column."
Bottom line, you have to manage relationships and locking when
you using bulk delete. The reason is that in order for us to
manage relationships, we have to have read the entities already
and know what the relationships are. This statement goes directly
to the DB and may delete entities that have not been read.
-Tom
On 13/10/2011 11:39 AM, Warren Tang wrote:
t does not do cascading de
_______________________________________________
eclipselink-users mailing list
eclipselink-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-users
|