When using a <join> with <subselect> in hbm configuration, a NullPointerException is thrown due to an empty table name: Caused by: java.lang.NullPointerException at org.hibernate.sql.Alias.toAliasString(Alias.java:38) at org.hibernate.mapping.Join.createPrimaryKey(Join.java:95) at org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindSecondaryTable(ModelBinder.java:1819) at org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindAllEntityAttributes(ModelBinder.java:1114) at org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindRootEntity(ModelBinder.java:265) at org.hibernate.boot.model.source.internal.hbm.ModelBinder.bindEntityHierarchy(ModelBinder.java:185) at org.hibernate.boot.model.source.internal.hbm.HbmMetadataSourceProcessorImpl.processEntityHierarchies(HbmMetadataSourceProcessorImpl.java:144) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess$1.processEntityHierarchies(MetadataBuildingProcess.java:218) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.complete(MetadataBuildingProcess.java:265) at org.hibernate.boot.model.process.spi.MetadataBuildingProcess.build(MetadataBuildingProcess.java:83) |