mirror of
https://github.com/hibernate/hibernate-orm
synced 2025-02-17 08:35:13 +00:00
HHH-15917 Unrelated Entity Join throws IllegalStateException
This commit is contained in:
parent
71ee7fbd3c
commit
7c5451d756
@ -14,6 +14,7 @@
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.hibernate.jpa.spi.JpaCompliance;
|
||||
import org.hibernate.metamodel.model.domain.BasicDomainType;
|
||||
import org.hibernate.query.hql.HqlLogging;
|
||||
import org.hibernate.query.hql.spi.SqmCreationProcessingState;
|
||||
import org.hibernate.query.hql.spi.SqmPathRegistry;
|
||||
@ -247,7 +248,8 @@ else if ( parentRegistered instanceof SqmEntityJoin<?> ) {
|
||||
}
|
||||
|
||||
private boolean definesAttribute(SqmPathSource<?> containerType, String name) {
|
||||
return containerType.findSubPathSource( name ) != null;
|
||||
return !( containerType.getSqmPathType() instanceof BasicDomainType )
|
||||
&& containerType.findSubPathSource( name ) != null;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
x
Reference in New Issue
Block a user