Skip to main content

CascadeType.REMOVE doesn't work with FetchType.LAZY

1 reply [Last post]
mgervais
Offline
Joined: 2006-04-24

Hi,
I'm trying to use CascadeType.REMOVE on a @OneToMany relationship, and it works with FetchType.EAGER but not with FetchType.LAZY, I don't know if it's a bug or not?
Thanks
Mickael

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
mvatkina
Offline
Joined: 2005-04-04

Hi Mickael,

The spec says "The remove operation
is cascaded to entities referenced by X" so it might be better to have the corresponding references instantiated in memory.

Regards,
-marina