openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Fay Wang (JIRA)" <>
Subject [jira] Updated: (OPENJPA-1021) PersistentMap MapKey applied to a relation field as key for a java.util.Map
Date Mon, 06 Apr 2009 16:40:13 GMT


Fay Wang updated OPENJPA-1021:

    Attachment: OPENJPA-1021.patch

This patch allows MapKey annotation to be applied to a relation field of the map value.

> PersistentMap MapKey applied to a relation field as key for a java.util.Map
> ---------------------------------------------------------------------------
>                 Key: OPENJPA-1021
>                 URL:
>             Project: OpenJPA
>          Issue Type: Improvement
>          Components: jpa
>    Affects Versions: 1.2.0
>            Reporter: Michael Vorburger
>         Attachments: OPENJPA-1021.patch,
> I've tried to use a relation field as key for a java.util.Map, using a PersistentMap
& MapKey annotation.
> Ideally, such a mapping should be supported of course. For an example real-world use
case, see the test case I'll attach (it's the same that I posted to the list last week).
> According to Fay Wang on, this is not possible today (v1.2.0),
(the short email exchange which lead to the creation of this JIRA).
> According to Pinaki Poddar on,ClassB%3E-problem-td534546.html
this should work. Either way, the current error message ("Map field ...  is attempting to
use a map table, but its key is mapped by another field.  Use an inverse key or join table
mapping.") is unclear. 
> At the very least, the documentation manual should clearly say that this is explicitly
not supported, or include an example if it is, and/or a clear error message should be printed
by the run-time. Ideally it should be a working and documenting mapping though...

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

View raw message