i have web application using jpa. entity manager keeps bunch of entites , update database other side. use mysql , use phpmyadmin , change row.
how tell entity manager re-synchronize, e.g. forgot entites in cache?
i know there refresh(object)
method, there possibility how refreshall()
or results in this?
it sure expensive operation if has done.
entitymanager.getentitymanagerfactory().getcache().evictall()
refresh
different since modifies object. line empty cache
, if fetch objects changed outside entity manager, actual database query instead of using outdated cached
value.
Comments
Post a Comment