Community
Participate
Working Groups
from http://www.eclipse.org/forums/index.php?t=rview&goto=698571#msg_698571 Hi All, I have a cached namedquery Code: [Select all] [Show/ hide] @NamedQuery(name = "CoverholderAgreement.all", query = "SELECT c FROM CoverholderAgreement c", hints = { @QueryHint(name = QueryHints. QUERY_RESULTS_CACHE, value=HintValues.TRUE) }) which speed up my code significantly... (so far so good) in some part of the application I add and delete objects... doing that, the namedquery cache is not automatically refreshed so I need to refresh it by hand at every occation that I modify the DB: Quote: utx.commit(); ((JpaEntityManager)em.getDelegate()).getServerSession().getIdentityMapAccessor().clearQueryCache("CoverholderAgreement.all"); I do not like this option as it leads to generate new bugs... think about the case when I persist another object which by CASCADING persists a new CoverholderAgreement and I forget to refresh the namedquery cache... (this things hapends specially after some time or when future developers maintain the code and they are not aware of some cached namedquery)... so just wondering if there is a better way for doing it ???? thanks !
I am closing this for now. The best way to get support is through the mailing lists or the newsgroup. If the result of your interaction with the support mechanisms is a specific suggestion for an enhancement, please feel free to reopen this with more detail.
Hi Tom, I've opened it as suggested by James (I tough he was a eclipselink developer) in the forum (see the link) as an enhancement request. let me know how do you open enhancement requests thanks
Sorry... missed the link.
See, https://bugs.eclipse.org/bugs/show_bug.cgi?id=398193 For change log.
Fixed in 2.5
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink