Hi all, playing around with Release M5 and am having a weird problem
with some toMany relationships.
Here's the test code:
template = tf.create("TestPageTemplate", false, ctx);
        assertNotNull(template);
        tf.addBlock(template, "Block1PageCreate", ctx);
        tf.addBlock(template, "Block2PageCreate", ctx);
        //assertEquals(2, template.getBlocks().size());
        
        CmsPage page = pf.create(template, name, description, ctx);
        assertNotNull(page);
        assertEquals(name, page.getName());
        assertEquals(description, page.getDescription());
        assertEquals(template, page.getTemplate());
        System.out.println("****** " + template.getBlocks().size() + "
-- " + page.getBlocks().size());
Now if I leave the first assertEquals(2,...) commented out I get a
print out of  ******* 4 --- 4.  Hmmm...interesting. BUT if I uncomment
the first assert I get a print out showing 2 -- 2 as I would expected!
Whats up with that? The database only shows that the 2 template blocks
have been created, but 4 show up in the list, and 4 show up in the
page blocks! Doh!
I believe I'm adding stuff correctly to the ctx/objects/whatever as
its all showing up and acts correctly with that assert
uncommented....any ideas?
-Nick
This archive was generated by hypermail 2.0.0 : Fri Aug 19 2005 - 12:52:03 EDT