Hello
The org.hibernate.Session interface takes an "entityName" argument for most operations such as save, update or delete. However the refresh() method does not do so, which gives be an org.hibernate.MappingException "Unkown entity" when I use it.
I need to refresh an entity after doing some SQL batch updates. I guess using Session.flush() followed by Session.clear() or Session.evict() is a workaround, but I feel the Session API is inconsistent in not providing a refresh method that takes an entityName argument.
Or is there some other explanation? I tried to search the Hibernate issue DB but could not find a bug for this. Let me know if I should file one (as a feature request).
Thanks
Trygve Hardersen Jotta AS
|