I am getting following exception while executing the query
org.hibernate.QueryException: Not all named parameters have been set:
[:jsonb]
This is my query:
SELECT * FROM content c,resource r,organization_resource_relationship
org,json_array_elements(c.attributes->'data') obj
WHERE c.resource_id=r.resource_id and r.account_id='633' and
r.resource_id = org.resource_id and r.delete_status = false
and ((obj->>'userId' in(select cast(resource_id as text) from resource
where resource_id=3181) or obj->>'signatureByCmisUsers'
like '%3181%' or obj->>'visibleToCmisUsers' like '%3181%' or
obj->>'editableByCmisUsers' like '%3181%' or
obj->>'obtainSignatureByCmisUsers'
like '%3181%' or obj->>'documentVisibleToCmisUsers' like '%3181%' ) and
(obj->>'signatureStatus' like 'Pending' or obj->>'signatureStatus'
like 'PENDING' or obj->>'signatureStatus' like 'SIGNED' or
obj->>'signatureStatus' like 'Signed') and
(obj->>'isDeleted'='false')
and ((obj->>'parentFolderId'='nil' or obj->>'parentFolderId' in
(select cast(resource_id as text) from
resource re where re.delete_status=false))) and
((obj->>'userType'='owner' or obj->>'userType'='receiver')))
and ((((obj->>'visibleToRoles' like '%215%') and
((obj->>'visibleToRoles') ::jsonb) ?
(select cast(resource_to_id as text) from resource_relationship where
resource_from_id=3181 and resource_to_id=215))))
and json_typeof(c.attributes->'data')='array' ORDER BY r.updated_on
DESC
How can solve the issue? I need to use ::jsonb
. But it throws an exception.