You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openjpa.apache.org by "Krzysztof Nienartowicz (JIRA)" <ji...@apache.org> on 2015/05/16 15:25:59 UTC

[jira] [Commented] (OPENJPA-2402) DataCache does not work with attributes using EAGER fetch

    [ https://issues.apache.org/jira/browse/OPENJPA-2402?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14546748#comment-14546748 ] 

Krzysztof Nienartowicz commented on OPENJPA-2402:
-------------------------------------------------

In our case DataCache is never used (regardless the FetchMode) when a map is used in way like this:

    @OneToMany(mappedBy = "fParent", cascade = {CascadeType.PERSIST,CascadeType.MERGE,CascadeType.REFRESH},
			fetch = FetchType.EAGER)

    @EagerFetchMode(FetchMode.PARALLEL)  // does not change behaviour
    @MapKey(name = "fTsType")
    @ElementType(TsImpl.class)
    @ReadOnly(UpdateAction.IGNORE)
	protected Map<TsType, Ts> fTS = new HashMap<TsType, Ts>();

We populate the cache with the native query (seen in the log) but i.e. DelegatingDataCache get methods are never called when accessing fTS.
openjpa 2.3.0
Best regards,
Chris





> DataCache does not work with attributes using EAGER fetch
> ---------------------------------------------------------
>
>                 Key: OPENJPA-2402
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2402
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: performance
>    Affects Versions: 2.2.2, 2.3.0
>         Environment: MAC, CentOS
>            Reporter: Kachara Raj
>
> Entities using @OneToMany or @ManyToMany with fetch = FetchType.EAGER are not getting cached when datacache is turned on.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)