Expression foreignKeyJoin = base.getMapping().buildObjectJoinExpression(base, (Object)null, getSession());
foreignKeyJoin = first.getMapping().buildObjectJoinExpression(first, targetObject, getSession()); } else if (getSecondChild().isObjectExpression() || getSecondChild().isParameterExpression()) { foreignKeyJoin = first.getMapping().buildObjectJoinExpression(first, getSecondChild(), getSession()); } else { throw QueryException.invalidUseOfToManyQueryKeyInExpression(this);