final Schema schema = getHibernateXmlBinder().getMetadata().getDatabase().getSchema( schemaName );
final String subSelect = HbmHelper.getSubselect( entityElement );
if ( subSelect != null ) {
final String logicalName = entityBinding.getEntity().getName();
InLineView inLineView = schema.getInLineView( logicalName );
if ( inLineView == null ) {
inLineView = schema.createInLineView( logicalName, subSelect );
}
entityBinding.setBaseTable( inLineView );
}