Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
JPAContainer - CachingMutableLocalEntityProvider
am I wrong, or should refreshEntity() be implemented in CachingMutableLocalEntityProvider to invalidate the cache?
We're using service methods to save data from our forms, and issue a entityProviderChange afterwards.
In order to tell the entityProvider, that something has really changed, we're currently issuing a
((CachingMutableLocalEntityProvider) prov).updateEntityProperty( entity.getId() , "version", entity.getVersion());
before we issue a JPAContainer.entityProviderChange(event) - but really, that seems to be a workaround.
I think you are right. Caching provider has a special version of refresh, but not of refreshEntity. Could you create a bug report to dev.vaadin.com about the issue? There is a smaller new release coming out quite soon with mostly JEE6 related helper classes. This issue should fit in as well if we work fast.
I created a ticket for you:
I'd appreciate if you could try everything works as expected with latest snapshot that includes a fix for this issue. The build is in our snapshot repository. So when you can find build dated for today here, try it and let me know if it works:
Thanks in advance!