openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey (JIRA)" <j...@apache.org>
Subject [jira] Created: (OPENJPA-418) @ManyToMany is allowed on a field of type whose keys and values are not spec-compliant
Date Wed, 24 Oct 2007 21:19:50 GMT
@ManyToMany is allowed on a field of type whose keys and values are not spec-compliant
--------------------------------------------------------------------------------------

                 Key: OPENJPA-418
                 URL: https://issues.apache.org/jira/browse/OPENJPA-418
             Project: OpenJPA
          Issue Type: Bug
    Affects Versions: 1.0.0, 0.9.7, 0.9.6, 0.9.0
            Reporter: Patrick Linskey


It is possible to write an object with a Map field declared like so:

    @ManyToMany
    private Map<AllFieldTypes,AllFieldTypes> map =
        new HashMap<AllFieldTypes,AllFieldTypes>();


This should not be possible; instead, we should require @PersistentMap usage, since the behavior
above is not spec-compliant.

    @PersistentMap
    private Map<AllFieldTypes,AllFieldTypes> map =
        new HashMap<AllFieldTypes,AllFieldTypes>();

Or, if we decide to support @ManyToMany usage, we must review the code in the PersistenceMetaDataParsers
to make sure that we're doing the right things, especially with keys. It looks like @ManyToMany
and @PersistentMap are handled very differently in that code.

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


Mime
View raw message