Hi all,
I’m trying to query process definitions from a tenant. The processDefinitionQuery looks as follows:
As you can see the tenantIds is a list of Strings with one element, ‘tenant-1’. However, the sql query that is executed is this:
select distinct
RES.*
from
ACT_RE_PROCDEF RES
inner join
(
select
KEY_,
TENANT_ID_,
max(VERSION_) as MAX_VERSION
from
ACT_RE_PROCDEF
group by
TENANT_ID_,
KEY_
)
VER
on RES.KEY_ = VER.KEY_
WHERE
RES.VERSION_ = VER.MAX_VERSION
and
(
RES.TENANT_ID_ = VER.TENANT_ID_
or
(
RES.TENANT_ID_ is null
and VER.TENANT_ID_ is null
)
)
and
(
RES.SUSPENSION_STATE_ = ?
)
and
(
RES.TENANT_ID_ in
(
?
)
)
and
(
RES.TENANT_ID_ is null
)
order by
RES.ID_ asc LIMIT ? OFFSET ?
As you can see the RES.TENANT_ID_ is both used in a IN statement, AND in a is null statement, resulting in an empty result. I’m not sure how I can debug this any further. Hope someone can give me a hint!
Thanks in advance,
Thomas