You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Simon Droscher (JIRA)" <ji...@apache.org> on 2009/07/29 19:04:14 UTC
[jira] Created: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Cannot retrieve Map<PersisenceCapable, PersistenceCapable> fields when DataCache is on
--------------------------------------------------------------------------------------
Key: OPENJPA-1205
URL: https://issues.apache.org/jira/browse/OPENJPA-1205
Project: OpenJPA
Issue Type: Bug
Components: datacache
Affects Versions: 1.2.1
Reporter: Simon Droscher
Consider the following mapping, which uses a Map of a PC class to another PC class:
@OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
@MapKey(name = "catalog")
public Map<Catalog, CatalogPrice> getCatalogPrices() {
return catalogPrices;
}
With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Simon Droscher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Droscher updated OPENJPA-1205:
------------------------------------
Description:
Consider the following mapping, which uses a Map of a PC class to another PC class:
@OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
@MapKey(name = "catalog")
public Map<Catalog, CatalogPrice> getCatalogPrices() {
return catalogPrices;
}
With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
The attached patch resolves this issue.
was:
Consider the following mapping, which uses a Map of a PC class to another PC class:
@OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
@MapKey(name = "catalog")
public Map<Catalog, CatalogPrice> getCatalogPrices() {
return catalogPrices;
}
With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods resolved OPENJPA-1205.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.0.0-M3
Fixed by OPENJPA-1232 in r802211
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Fix For: 2.0.0-M3
>
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Simon Droscher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Droscher updated OPENJPA-1205:
------------------------------------
Attachment: EntityToEntityMapFix.patch
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12736747#action_12736747 ]
Donald Woods commented on OPENJPA-1205:
---------------------------------------
Can you attach a patch that adds or modifies an existing junit testcase to demonstrate the original failure?
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods reassigned OPENJPA-1205:
-------------------------------------
Assignee: Donald Woods
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Assignee: Donald Woods
> Fix For: 1.3.0, 2.0.0
>
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1205:
----------------------------------
Fix Version/s: (was: 2.0.0)
(was: 1.3.0)
Assignee: (was: Donald Woods)
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Simon Droscher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848395#action_12848395 ]
Simon Droscher commented on OPENJPA-1205:
-----------------------------------------
The fix in OPENJPA-1232 is essentially the same change as that in my patch to this issue. So yes, it does appear to resolve this issue.
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Simon Droscher (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Simon Droscher updated OPENJPA-1205:
------------------------------------
Summary: Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on (was: Cannot retrieve Map<PersisenceCapable, PersistenceCapable> fields when DataCache is on)
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12848313#action_12848313 ]
Donald Woods commented on OPENJPA-1205:
---------------------------------------
Does the fix for OPENJPA-1232 in 2.0.0-M3 or later resolve this issue?
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Assignee: Donald Woods
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (OPENJPA-1205) Cannot retrieve
Map fields when DataCache is on
Posted by "Donald Woods (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/OPENJPA-1205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Donald Woods updated OPENJPA-1205:
----------------------------------
Fix Version/s: 2.0.0
1.3.0
> Cannot retrieve Map<PersistenceCapable, PersistenceCapable> fields when DataCache is on
> ---------------------------------------------------------------------------------------
>
> Key: OPENJPA-1205
> URL: https://issues.apache.org/jira/browse/OPENJPA-1205
> Project: OpenJPA
> Issue Type: Bug
> Components: datacache
> Affects Versions: 1.2.1
> Reporter: Simon Droscher
> Fix For: 1.3.0, 2.0.0
>
> Attachments: EntityToEntityMapFix.patch
>
>
> Consider the following mapping, which uses a Map of a PC class to another PC class:
> @OneToMany(targetEntity = CatalogProductPriceImpl.class, cascade = { CascadeType.ALL })
> @MapKey(name = "catalog")
> public Map<Catalog, CatalogPrice> getCatalogPrices() {
> return catalogPrices;
> }
> With the DataCache on, when a product is retrieved for the first time, this map will be correct. However, the next time it is retrieved (i.e. from the cache), what is returned is a Map<LongId, CatalogPrice> not the expected Map<Catalog, CatalogPrice>.
> The attached patch resolves this issue.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.