img = (Image) u.saveAndReturnObject(img);
img = (Image) iUpdate.saveAndReturnObject(img);
    public void testAndSaveSomtheingWithParents() throws Exception    {        DatasetData dd = simpleDatasetData();        Set dss = new HashSet();        dss.add(dd);        imgData = simpleImageData();        imgData.setDatasets(dss);                img = (Image) reverse.map(imgData);        img = (Image) u.saveAndReturnObject(img);        assertTrue("It better have a dataset link",                img.getDatasetLinks().size()>0);        ILink link = (ILink) img.getDatasetLinks().iterator().next();        ds = (Dataset) link.getParent();        Long id = ds.getId();                // another copy        Image img2 = (Image) q.queryUnique(                "select i from Image i " +                "left outer join fetch i.datasetLinks " +                "where i.id = ?",                new Object[]{img.getId()});        assertTrue("It better have a dataset link too",                img2.getDatasetLinks().size()>0);        ILink link2 = (ILink) img2.getDatasetLinks().iterator().next();        Dataset ds2 = (Dataset) link2.getParent();        assertTrue("And the ids have to be the same",id.equals(ds2.getId()));    }