users@glassfish.java.net

Re: Cascade delete problem, JPA

From: <glassfish_at_javadesktop.org>
Date: Mon, 09 Feb 2009 12:37:22 PST

This was stupid. The problem was the remove logic. I changed it to the following and then it worked.

public void deleteA(A a)
{
a = em.find(A.class, a.getId());
em.remove(a);
}

/Mattias
[Message sent by forum member 'nightzero' (nightzero)]

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