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