BUG?: performQuery() != {setFetchingDataRows(), objectFromDataRow(), performQuery()} for OpenBase time type

From: Mike Kienenberger (mkienen..laska.net)
Date: Sat Dec 20 2003 - 14:57:30 EST

  • Next message: Mike Kienenberger: "FWD: weird 'SoundsLike' insert error during unit testing on OpenBase support for Cayenne framework"

    Well, I have tracked the OpenBase time test failure to this:

    performQuery() != {setFetchingDataRows(), objectFromDataRow(),
    performQuery()} for OpenBase time type

    I expanded the test case to the following code, which first reads in a raw
    data row, then converts it, which works.
    Immediately performing a direct-to-DataObject test afterward fails.

    I did originally try both separately, with the direct-to-DataObject failing
    and the DataRow solution working, so it's not an order-related problem.

    Are more unit tests needed for detecting these kinds of problems?

    -Mike

    In org.objectstyle.cayenne.access.DateTimeTypesTst: testTime()

                    // DateTest testRead = (DateTest) context.performQuery(q).get(0);
                    q.setFetchingDataRows(true);
                    DataRow testReadDataRow = (DataRow) context.performQuery(q).get(0);
                    System.err.println("testReadDataRow=" + testReadDataRow);
                    DateTest testRead = (DateTest)context.objectFromDataRow("DateTest",
    testReadDataRow);
                    System.err.println("testRead=" + testRead);
                    assertNotNull(testRead.getTimeColumn());
                    assertEquals(nowTime, testRead.getTimeColumn());

                    SelectQuery q2 = new SelectQuery(DateTest.class);
                    DateTest testRead2 = (DateTest) context.performQuery(q2).get(0);
            assertNotNull(testRead2.getTimeColumn());
            assertEquals(nowTime, testRead2.getTimeColumn()); // <- Fails on
    this line



    This archive was generated by hypermail 2.0.0 : Sat Dec 20 2003 - 14:57:10 EST