Added @ TenantId to both entities
{noformat} @TenantId @Override public String getZuHuID() { return zuHuID; }{noformat}
Define Query:
{noformat} @Query("select count(s) from SM_ZD_SHUJUYLBModel as s left join SM_SQ_ShenQingDMXModel as a on s.id=a.id ") int testCount();{noformat}
Generated SQL:
{noformat}select count(s1_0.id) from sm_zd_shujuylb s1_0 left join sm_sq_shenqingdmx s2_0 on s1_0.id=s2_0.id where s1_0.zuHuID = ?{noformat}
Related to [https://hibernate.atlassian.net/browse/HHH-11659|https://hibernate.atlassian.net/browse/HHH-11659|smart-link] |
|