I've found that with subclasses (in the same table, not joined), batch-size neither inherits from the parent <class> mapping, nor am I allowed to enter it on the <subclass> mapping. (I get an XML Validation Error: the 'batch-size' attribute is not declared)
However, I've found that I can make batch-loading of subclasses work if I programmatically retrieve the PersistentClass for my subclass via the Configuration object and manually set its BatchSize attribute before calling BuildSessionFactory. I haven't tested extensively enough to know whether there are any negative side-effects to doing this.
Does anyone know if the lack of batch-loading for subclasses is a bug, such as accidentally omitting it from the schema, or a feature that was deliberately disabled?
|