[OS-JIRA] Created: (CAY-68) performQuery -> DataObject != performQuery -> DataRow -> DataObject

From: jir..bjectstyle.org
Date: Mon Dec 22 2003 - 11:09:17 EST

  • Next message: jir..bjectstyle.org: "[OS-JIRA] Created: (CAY-69) bin/modeler.sh should ship with +x bit set"

    Message:

      A new issue has been created in JIRA.

    ---------------------------------------------------------------------
    View the issue:

      http://objectstyle.org/jira/secure/ViewIssue.jspa?key=CAY-68

    Here is an overview of the issue:
    ---------------------------------------------------------------------
            Key: CAY-68
        Summary: performQuery -> DataObject != performQuery -> DataRow -> DataObject
           Type: Bug

         Status: Assigned
       Priority: Major

        Project: Cayenne
     Components:
                 Cayenne Core Library
       Versions:
                 1.1 [DEV]

       Assignee: Andrus Adamchik
       Reporter: Mike Kienenberger

        Created: Mon, 22 Dec 2003 11:08 AM
        Updated: Mon, 22 Dec 2003 11:08 AM
    Environment: 2003-12-20 cayenne head and OpenBase database

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

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

    I expanded the DateTimeTypesTst 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

    ---------------------------------------------------------------------
    JIRA INFORMATION:
    This message is automatically generated by JIRA.

    If you think it was sent incorrectly contact one of the administrators:
       http://objectstyle.org/jira/secure/Administrators.jspa

    If you want more information on JIRA, or have a bug to report see:
       http://www.atlassian.com/software/jira



    This archive was generated by hypermail 2.0.0 : Mon Dec 22 2003 - 11:09:18 EST