You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Abe White (JIRA)" <ji...@apache.org> on 2007/03/28 22:29:25 UTC

[jira] Closed: (OPENJPA-191) cannot define composite ID that incorproates @ManyToOne field

     [ https://issues.apache.org/jira/browse/OPENJPA-191?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Abe White closed OPENJPA-191.
-----------------------------

    Resolution: Invalid

The given test case is invalid.  Per the docs, the book field in the PageId class must be of type String to match the primary key field type of Book.  Please reopen if that doesn't work. 

> cannot define composite ID that incorproates @ManyToOne field
> -------------------------------------------------------------
>
>                 Key: OPENJPA-191
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-191
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 0.9.6
>         Environment: java se 5
> derby
>            Reporter: Jeffrey Blatttman
>            Priority: Minor
>         Attachments: book.zip
>
>
> 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]

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.