Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-191

cannot define composite ID that incorproates @ManyToOne field

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Invalid
    • Affects Version/s: 0.9.6
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      java se 5
      derby

      Description

      cannot define composite ID that incorproates @ManyToOne field. see sample test case attached (book.zip). this is a maven2 project, and you can reproduce the bug by starting derby on localhost and doing a "mvn install". the resulting error message during enhancement is:

      [java] Exception in thread "main" <4|true|0.9.6-incubating> org.apache.openjpa.util.MetaDataException: The id class specified by type "class com.mycompany.book.Page" does not match the primary key fields of the class. Make sure your identity class has the same primary keys as your persistent type, that the access types are the same, and if you are getting this error at runtime, that you have your persistent class since last compiling your identity class.
      [java] FailedObject: book [java.lang.String]

        Attachments

        1. book.zip
          17 kB
          Jeffrey Blattman

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              farble1670 Jeffrey Blattman
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: