Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] JPQL does not do cascading delete

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


Back to the top