]
Steve Ebersole closed HHH-805.
------------------------------
Closing stale resolved issues
Session.getStatistics().getEntityCount() throws
UnsupportedOperationException
-----------------------------------------------------------------------------
Key: HHH-805
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-805
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.1 rc3
Reporter: Derek Hulley
Assignee: Emmanuel Bernard
Priority: Minor
Fix For: 3.1 beta 2
The following code:
SessionStatistics stats = session.getStatistics();
// have we exceeded the maximum entity count
int entityCount = stats.getEntityCount();
throws an UnsupportedOperationException originating in:
org.hibernate.util.IdentityMap#keySet()
The following lines in SessionStatisticsImpl.java fix the issue:
========================
public int getEntityCount() {
return session.getPersistenceContext().getEntityEntries().size();
}
public int getCollectionCount() {
return session.getPersistenceContext().getCollectionEntries().size();
}
=========================
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: