[hibernate-dev] Envers compile issue

Steve Ebersole steve at hibernate.org
Thu Apr 11 17:07:27 EDT 2013


I just made a change to help catch runtime problems that kept cropping 
up.  The change was to org.hibernate.mapping.Value#getColumnIterator.  
The problem is that code in many modules (hem, envers) that actually 
deals with mapping code were making a bad assumption here.  The returned 
iterator actually returns a Iterable<Selectable>, not Iterable<Column>.  
Selectable is the contract shared between Column and Formula.  So when 
code non-defensively tries to treat that thing as a Iterable<Column> we 
often have issues.

Yes, the method is very poorly named.  Actually it predates formula as a 
feature.  But be that as it may, the code casting those elements to 
Column are just wrong.

For envers, I am not actually sure how to handle Formula elements. I 
need some help there.  The issues are all isolated to 
org.hibernate.envers.configuration.internal.metadata  Could someone more 
familiar with envers (and especially its entity definition stuff) take a 
look?

Thanks!


More information about the hibernate-dev mailing list