db-jdo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michelle Caisse (JIRA)" <j...@apache.org>
Subject [jira] Updated: (JDO-382) Add test for selecting and updating an embedded field
Date Mon, 19 Jun 2006 17:53:30 GMT
     [ http://issues.apache.org/jira/browse/JDO-382?page=all ]

Michelle Caisse updated JDO-382:
--------------------------------

    Attachment: JDO-382.patch

See attached patch for this issue.  I have added a method to test changing a projected embedded
field and another method that tests changing a projected Date field. Only these methods are
new, but the entire file is in the diff because I changed tabs to spaces and broke long lines.

JPOX passes the new test for embedded fields but fails on a Date field:

    [java] 1) testDateField(org.apache.jdo.tck.models.embedded.SecondClassObjectsTrackTheirChanges)junit.framework.AssertionFailedError:
    [java] Expected Company instance not to be dirty; actual state is {persistent, transactional,
dirty}
    [java] Expected projected field value is Fri Jun 16 04:29:21 PDT 2006; actual value is
Wed Dec 31 16:02:03 PST 1969
    [java]
    [java]      at org.apache.jdo.tck.JDO_Test.failOnError(JDO_Test.java:1052)
    [java]      at org.apache.jdo.tck.models.embedded.SecondClassObjectsTrackTheirChanges.testDateField(SecondClassObjectsTrackTheirChanges.java:233)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    [java]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    [java]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    [java]      at org.apache.jdo.tck.JDO_Test.runBare(JDO_Test.java:237)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.doRun(BatchTestRunner.java:107)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.start(BatchTestRunner.java:147)
    [java]      at org.apache.jdo.tck.util.BatchTestRunner.main(BatchTestRunner.java:122)

> Add test for selecting and updating an embedded field
> -----------------------------------------------------
>
>          Key: JDO-382
>          URL: http://issues.apache.org/jira/browse/JDO-382
>      Project: JDO
>         Type: Test

>   Components: tck20
>     Versions: JDO 2 final
>     Reporter: Craig Russell
>     Assignee: Michelle Caisse
>      Fix For: JDO 2 maintenance release 1
>  Attachments: JDO-382.patch
>
> If you select an embedded field and change it, we need to verify that the object has
changed. 
> Currently no test exists for this case.
> Select Address from Employee where name.startsWith('Michael')
> address.zip = "94040";
> tx.commit();
> verify that address.zip has been changed in the database.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message