You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "chenxiaohu (JIRA)" <ji...@apache.org> on 2008/02/24 05:15:19 UTC
[jira] Created: (OPENJPA-523) Map mapping error when use DataCache
Map mapping error when use DataCache
------------------------------------
Key: OPENJPA-523
URL: https://issues.apache.org/jira/browse/OPENJPA-523
Project: OpenJPA
Issue Type: Bug
Affects Versions: 1.0.2, 1.0.1, 1.0.0
Environment: sunjdk 1.6.0_02
Reporter: chenxiaohu
As the following two Entity A and B, a.getBMap() throws
Exception in thread "main" <openjpa-1.0.2-r420667:627158 fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using oid "key=mapbug.B-51" of type "class java.util.HashMap$Entry". Registered oid type mappings: "{class java.util.HashMap$Entry=null, class org.apache.openjpa.util.LongId=class mapbug.B}"
when use DataCache
====================
<property name="openjpa.DataCache" value="true"/>
<property name="openjpa.RemoteCommitProvider" value="sjvm"/>
====================
@Entity
public class A {
...
@OneToMany(mappedBy="a", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
@MapKey(name="key")
Map<String, B> bMap;
...
}
@Entity
public class B {
...
@ManyToOne
@JoinColumn(name="a_id")
A a;
@Column(name="ky")
String key;
String value;
...
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-523) Map mapping error when use DataCache
Posted by "chenxiaohu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chenxiaohu resolved OPENJPA-523.
--------------------------------
Resolution: Duplicate
Fix Version/s: 1.1.0
Resolved with https://issues.apache.org/jira/browse/OPENJPA-589
> Map mapping error when use DataCache
> ------------------------------------
>
> Key: OPENJPA-523
> URL: https://issues.apache.org/jira/browse/OPENJPA-523
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.0.0, 1.0.1, 1.0.2
> Environment: sunjdk 1.6.0_02
> Reporter: chenxiaohu
> Fix For: 1.1.0
>
> Attachments: mapbug.zip
>
>
> As the following two Entity A and B, a.getBMap() throws
> Exception in thread "main" <openjpa-1.0.2-r420667:627158 fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using oid "key=mapbug.B-51" of type "class java.util.HashMap$Entry". Registered oid type mappings: "{class java.util.HashMap$Entry=null, class org.apache.openjpa.util.LongId=class mapbug.B}"
> when use DataCache
> ====================
> <property name="openjpa.DataCache" value="true"/>
> <property name="openjpa.RemoteCommitProvider" value="sjvm"/>
> ====================
> @Entity
> public class A {
> ...
> @OneToMany(mappedBy="a", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
> @MapKey(name="key")
> Map<String, B> bMap;
> ...
> }
> @Entity
> public class B {
> ...
> @ManyToOne
> @JoinColumn(name="a_id")
> A a;
> @Column(name="ky")
> String key;
> String value;
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-523) Map mapping error when use DataCache
Posted by "chenxiaohu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
chenxiaohu updated OPENJPA-523:
-------------------------------
Attachment: mapbug.zip
Code to demo the bug
> Map mapping error when use DataCache
> ------------------------------------
>
> Key: OPENJPA-523
> URL: https://issues.apache.org/jira/browse/OPENJPA-523
> Project: OpenJPA
> Issue Type: Bug
> Affects Versions: 1.0.0, 1.0.1, 1.0.2
> Environment: sunjdk 1.6.0_02
> Reporter: chenxiaohu
> Attachments: mapbug.zip
>
>
> As the following two Entity A and B, a.getBMap() throws
> Exception in thread "main" <openjpa-1.0.2-r420667:627158 fatal user error> org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using oid "key=mapbug.B-51" of type "class java.util.HashMap$Entry". Registered oid type mappings: "{class java.util.HashMap$Entry=null, class org.apache.openjpa.util.LongId=class mapbug.B}"
> when use DataCache
> ====================
> <property name="openjpa.DataCache" value="true"/>
> <property name="openjpa.RemoteCommitProvider" value="sjvm"/>
> ====================
> @Entity
> public class A {
> ...
> @OneToMany(mappedBy="a", cascade=CascadeType.ALL, fetch=FetchType.LAZY)
> @MapKey(name="key")
> Map<String, B> bMap;
> ...
> }
> @Entity
> public class B {
> ...
> @ManyToOne
> @JoinColumn(name="a_id")
> A a;
> @Column(name="ky")
> String key;
> String value;
> ...
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.