JDO
  1. JDO
  2. JDO-503

Create tests for JDO 2.1 annotations

    Details

      Description

      Create tests for JDO annotations

      1. datastoreidentity_company_package_jdo.patch
        0.8 kB
        Andy Jefferson
      2. applicationidentity_company_package_jdo.patch
        3 kB
        Andy Jefferson
      3. company_annotatedpi.patch
        14 kB
        Andy Jefferson
      4. applicationidentity_sql.patch
        1 kB
        Andy Jefferson
      5. datastoreidentity_sql.patch
        1 kB
        Andy Jefferson
      6. PC.patch
        527 kB
        Michelle Caisse

        Activity

        Hide
        Michelle Caisse added a comment -

        Checked in new and modified classes for annotations tests, Rrevision: 556949

        Show
        Michelle Caisse added a comment - Checked in new and modified classes for annotations tests, Rrevision: 556949
        Hide
        Michelle Caisse added a comment -

        Refactored tests into new packages. Now both identity types and their factories are in packages separated for FC (field-class annotations) and PI (property interface annotations). Completed: At revision: 557767

        Show
        Michelle Caisse added a comment - Refactored tests into new packages. Now both identity types and their factories are in packages separated for FC (field-class annotations) and PI (property interface annotations). Completed: At revision: 557767
        Hide
        Michelle Caisse added a comment -

        Refactored company factories. We now have an abstract delegator, and a delegator for PMFCApp, PMFCDS, PMPIApp, PMPIDS. PM = use persistence manager to create new instance. FC = annotations on field, class. App = application identity. DS = datastore identity. More to follow.

        Show
        Michelle Caisse added a comment - Refactored company factories. We now have an abstract delegator, and a delegator for PMFCApp, PMFCDS, PMPIApp, PMPIDS. PM = use persistence manager to create new instance. FC = annotations on field, class. App = application identity. DS = datastore identity. More to follow.
        Hide
        Andy Jefferson added a comment -

        src/java/org/apache/jdo/tck/pc/companyAnnotatedPI/PIDSPerson.java refers to org.apache.jdo.tck.pc.companyAnnotatedPI.PIAppAddress.class. Perhaps that should be the DS class not the App class.

        Show
        Andy Jefferson added a comment - src/java/org/apache/jdo/tck/pc/companyAnnotatedPI/PIDSPerson.java refers to org.apache.jdo.tck.pc.companyAnnotatedPI.PIAppAddress.class. Perhaps that should be the DS class not the App class.
        Hide
        Andy Jefferson added a comment -

        Add missing definition of PIDepartment.employeeOfTheMonth as persistent in package.jdo

        Show
        Andy Jefferson added a comment - Add missing definition of PIDepartment.employeeOfTheMonth as persistent in package.jdo
        Hide
        Andy Jefferson added a comment -

        Missing @Persistent and types for PIDSEmployee under datastore-identity

        Show
        Andy Jefferson added a comment - Missing @Persistent and types for PIDSEmployee under datastore-identity
        Hide
        Andy Jefferson added a comment -

        Missing @Persistent and types for PIAppEmployee (in PIAppInsurance)

        Show
        Andy Jefferson added a comment - Missing @Persistent and types for PIAppEmployee (in PIAppInsurance)
        Hide
        Andy Jefferson added a comment -

        Updates to persistent-interface definitions in package.jdo for app-id to add in all missing persistent properties and field-types.

        Show
        Andy Jefferson added a comment - Updates to persistent-interface definitions in package.jdo for app-id to add in all missing persistent properties and field-types.
        Hide
        Andy Jefferson added a comment -

        Patch for whole of org.apache.jdo.tck.pc.companyAnnotatedPI package adding missing @Persistent(types=...) annotations and correcting some existing ones

        Show
        Andy Jefferson added a comment - Patch for whole of org.apache.jdo.tck.pc.companyAnnotatedPI package adding missing @Persistent(types=...) annotations and correcting some existing ones
        Hide
        Andy Jefferson added a comment -

        There is also a problem with companyAnnotatedPI and the schema that it uses. You have a discriminator column in several places of length 64. You now have class names that exceed this limit
        e.g "org.apache.jdo.tck.pc.companyAnnotatedPI.PIDSMedicalInsuranceImpl" (the name that JPOX generates for the generated implementation of the PI). Make it longer ?

        Show
        Andy Jefferson added a comment - There is also a problem with companyAnnotatedPI and the schema that it uses. You have a discriminator column in several places of length 64. You now have class names that exceed this limit e.g "org.apache.jdo.tck.pc.companyAnnotatedPI.PIDSMedicalInsuranceImpl" (the name that JPOX generates for the generated implementation of the PI). Make it longer ?
        Hide
        Craig L Russell added a comment -

        Who ever expected that the class name would ever be greater than 64?

        Certainly this should be changed in the schema. How about 100?

        Show
        Craig L Russell added a comment - Who ever expected that the class name would ever be greater than 64? Certainly this should be changed in the schema. How about 100?
        Hide
        Andy Jefferson added a comment -

        Further updates for schema mapping

        Show
        Andy Jefferson added a comment - Further updates for schema mapping
        Hide
        Andy Jefferson added a comment -

        Schema mapping updates to extend discriminator in two places of company model to 255 (it was 255 in several classes of company, but some had 64, so this adds consistency)

        Show
        Andy Jefferson added a comment - Schema mapping updates to extend discriminator in two places of company model to 255 (it was 255 in several classes of company, but some had 64, so this adds consistency)
        Hide
        Michelle Caisse added a comment -

        I checked in all the patches. Thanks very much!

        Show
        Michelle Caisse added a comment - I checked in all the patches. Thanks very much!
        Hide
        Michelle Caisse added a comment -

        This patch adds a new pc package with company model classes containing property annotations as well as new configuration files and new entries in configurations.list. Enhancement fails with

        14:35:45,640 (main) ERROR [JPOX.Enhancer] - An error was encountered reading the specified input files. Please consult the log for details. The following may help : Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class!
        Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class!
        org.jpox.metadata.InvalidMetaDataException: Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class!
        at org.jpox.metadata.ClassMetaData.populateMemberMetaData(ClassMetaData.java:568)
        at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:252)
        at org.jpox.metadata.AbstractClassMetaData.validateSuperClass(AbstractClassMetaData.java:740)
        at org.jpox.metadata.AbstractClassMetaData.determineSuperClassName(AbstractClassMetaData.java:660)
        at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:235)
        at org.jpox.metadata.AbstractClassMetaData.validateSuperClass(AbstractClassMetaData.java:740)
        at org.jpox.metadata.AbstractClassMetaData.determineSuperClassName(AbstractClassMetaData.java:660)
        at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:235)
        at org.jpox.metadata.MetaDataManager.populateFileMetaData(MetaDataManager.java:1584)
        at org.jpox.metadata.MetaDataManager.initialise(MetaDataManager.java:315)
        at org.jpox.enhancer.JPOXEnhancer.getFileMetaDataForInput(JPOXEnhancer.java:724)
        at org.jpox.enhancer.JPOXEnhancer.main(JPOXEnhancer.java:533)

        Show
        Michelle Caisse added a comment - This patch adds a new pc package with company model classes containing property annotations as well as new configuration files and new entries in configurations.list. Enhancement fails with 14:35:45,640 (main) ERROR [JPOX.Enhancer] - An error was encountered reading the specified input files. Please consult the log for details. The following may help : Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class! Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class! org.jpox.metadata.InvalidMetaDataException: Class org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson has field org.apache.jdo.tck.pc.companyAnnotatedPC.PCDSPerson.phoneNumber declared in MetaData, but this field doesnt exist in the class! at org.jpox.metadata.ClassMetaData.populateMemberMetaData(ClassMetaData.java:568) at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:252) at org.jpox.metadata.AbstractClassMetaData.validateSuperClass(AbstractClassMetaData.java:740) at org.jpox.metadata.AbstractClassMetaData.determineSuperClassName(AbstractClassMetaData.java:660) at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:235) at org.jpox.metadata.AbstractClassMetaData.validateSuperClass(AbstractClassMetaData.java:740) at org.jpox.metadata.AbstractClassMetaData.determineSuperClassName(AbstractClassMetaData.java:660) at org.jpox.metadata.ClassMetaData.populate(ClassMetaData.java:235) at org.jpox.metadata.MetaDataManager.populateFileMetaData(MetaDataManager.java:1584) at org.jpox.metadata.MetaDataManager.initialise(MetaDataManager.java:315) at org.jpox.enhancer.JPOXEnhancer.getFileMetaDataForInput(JPOXEnhancer.java:724) at org.jpox.enhancer.JPOXEnhancer.main(JPOXEnhancer.java:533)
        Hide
        Michelle Caisse added a comment -

        Need to add tests for JPA annotations.

        Show
        Michelle Caisse added a comment - Need to add tests for JPA annotations.
        Hide
        Michelle Caisse added a comment -

        Added tests for JPA annotations, revision: 582075

        Show
        Michelle Caisse added a comment - Added tests for JPA annotations, revision: 582075

          People

          • Assignee:
            Michelle Caisse
            Reporter:
            Michelle Caisse
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development