DataObject link = ssn.create("examples.ArticleImageLink");
DataObject link = ssn.create("linkTest.ArticleImageLink");
    public void testArticleImageLink() {        Session ssn = SessionManager.getSession();        DataObject article = ssn.create("examples.Article");        article.set("id", BigInteger.ZERO);        String text = "This is the article text.";        article.set("text", text);        for (int i = 0; i < 10; i++) {            DataObject image = ssn.create("examples.Image");            image.set("id", new BigInteger(Integer.toString(i)));            byte[] bytes = "This is the image.".getBytes();            image.set("bytes", bytes);            image.save();        }        DataAssociation links = (DataAssociation) article.get("images");        DataCollection images = ssn.retrieve("examples.Image");        while (images.next()) {            DataObject image = images.getDataObject();            DataObject link = ssn.create("examples.ArticleImageLink");            link.set("article", article);            link.set("image", image);            link.set("caption", "The caption for: " + image.getOID());            links.add(link);        }        article.save();        DataAssociationCursor cursor = links.cursor();        while (cursor.next()) {            s_log.info(cursor.get("caption"));            s_log.info(cursor.get("image"));        }        DataCollection aiLinks = ssn.retrieve("examples.ArticleImageLink");        aiLinks.addEqualsFilter("image.id", new BigDecimal(5));        while (aiLinks.next()) {            s_log.info(aiLinks.get("article"));            s_log.info(aiLinks.get("image"));            s_log.info(aiLinks.get("caption"));        }    }