Skip to content

Commit b131556

Browse files
authored
Throw entity not mapped exception for entity join in hql if possible (#2485)
1 parent 3f8afe3 commit b131556

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/NHibernate/Hql/Ast/ANTLR/HqlSqlWalker.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -794,7 +794,8 @@ private IQueryable ResolveEntityJoinReferencedPersister(IASTNode path)
794794
if (path.Type == IDENT)
795795
{
796796
var pathIdentNode = (IdentNode) path;
797-
return SessionFactoryHelper.FindQueryableUsingImports(pathIdentNode.Path);
797+
// Since IDENT node is not expected for implicit join path, we can throw on not found persister
798+
return (IQueryable) SessionFactoryHelper.RequireClassPersister(pathIdentNode.Path);
798799
}
799800
else if (path.Type == DOT)
800801
{

0 commit comments

Comments
 (0)