0
아래는 HQL로 변환하려는 my sql입니다. 누군가 이걸로 나를 도울 수 있습니까?다중 내부 조인 (HQL)
select ti.tax_id_no,
u1.user_id,
u1.user_nm_fst,
u1.user_nm_lst,
u1.user_ph_no,
u1.user_email
from pcmp.tax_identifier ti
inner join (select ucax.user_id, ucax.cust_id
from pcmp.users_customer_access_xref ucax
where ucax.ptcp_typ_cd = 'insrd'
and ucax.void_ind = 'n'
and ucax.user_cust_accs_xref_end_dt is null) ucax1
on ucax1.cust_id = ti.cust_id
inner join (select u.user_id,
u.user_nm_fst,
u.user_nm_lst,
u.user_ph_no,
u.user_email
from pcmp.users u
where u.user_end_dt is null
and u.user_void_ind = 'n') u1
on u1.user_id = ucax1.user_id
where ti.tax_id_no = '830204947'-- '465202523'
and ti.void_ind = 'n'
and ti.tax_id_end_dt is null
내가 오류에 아래의 쿼리를 사용하려고했지만 실행 - -
String queryString = "select u from User u"
+ " INNER JOIN u.ucax userCustomerAccessXref"
+ " INNER JOIN u.ti taxIdentifier"
+ " where taxIdentifier.tax_id_id = ?1";
나는 위의 쿼리는 사용하여 얻을 예외 나는 또한 현재 나에게 nullpointer 예외를주고 내 HQL을 게시하고 -
java.lang.NullPointerException이
org.hibernate.hql.ast.HqlSqlWalker.createFromJoinElement(HqlSqlWalker.java:383)
org.hibernate.hql.antlr.HqlSqlBaseWalker.joinElement(HqlSqlBaseWalker.java:3585)
org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElement(HqlSqlBaseWalker.java:3366)
org.hibernate.hql.antlr.HqlSqlBaseWalker.fromElementList(HqlSqlBaseWalker.java:3239)
org.hibernate.hql.antlr.HqlSqlBaseWalker.fromClause(HqlSqlBaseWalker.java:726)