users@glassfish.java.net

Re: _at_OnetoMany in JPA: Problem with remove/delete

From: <glassfish_at_javadesktop.org>
Date: Wed, 30 Jul 2008 00:11:29 PDT

I tried the following code in DAO class to remove the PromptSelectionsDetails List values before removing the parent entity. But it didn't solved my problem yet. Do you have any other way to overcome this?

List<PromptsSelectionsDetails> prSelDtlsList = (List<PromptsSelectionsDetails>)prSel.getPromptsSelectionsDetailsList();
for(PromptsSelectionsDetails pr:prSelDtlsList){
         getJpaTemplate().remove(pr);
}

Thanks.
[Message sent by forum member 'dinesh_kb' (dinesh_kb)]

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