You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Patrick Linskey (JIRA)" <ji...@apache.org> on 2007/10/24 23:19:50 UTC
[jira] Created: (OPENJPA-418) @ManyToMany is allowed on a field of
type whose keys and values are not spec-compliant
@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.