}
public void testNoCascadeDelete ()
{
CascadesEntity ent = new CascadesEntity ();
CascadesEntity rel = new CascadesEntity ();
CascadesEntity depend = new CascadesEntity ();
ent.setNone (rel);
ent.setDependent (depend);
ent.getNoneCollection ().add (rel);
OpenJPAEntityManager em = (OpenJPAEntityManager)currentEntityManager();
startTx(em);
em.persistAll (ent, rel, depend);
endTx(em);
long id = ent.getId ();
long relId = rel.getId ();
long dependId = depend.getId ();
endEm(em);
em = (OpenJPAEntityManager)currentEntityManager();
ent = em.find (CascadesEntity.class, id);
rel = ent.getNone ();
depend = ent.getDependent ();
assertEquals (relId, rel.getId ());
assertEquals (dependId, depend.getId ());
assertEquals (1, ent.getNoneCollection ().size ());
assertEquals (relId, ent.getNoneCollection ().iterator ().next ().getId ());
startTx(em);
em.remove (ent);