HHH-11173 : Change CollectionType#renderLoggableString to return '<uninitialized>' when collection is uninitialized

This commit is contained in:
Gail Badner 2017-01-17 21:40:00 -05:00
parent 4d6cda1548
commit 122f00f30c

View File

@ -199,6 +199,10 @@ public String toLoggableString(Object value, SessionFactoryImplementor factory)
}
protected String renderLoggableString(Object value, SessionFactoryImplementor factory) throws HibernateException {
if ( !Hibernate.isInitialized( value ) ) {
return "<uninitialized>";
}
final List<String> list = new ArrayList<String>();
Type elemType = getElementType( factory );
Iterator itr = getElementsIterator( value );