ParameterList size issue

i am facing issue while passing list of 50000 ids in ParameterList in HQL. Can someone help me?

I don’t think anyone can help you with that. You will have to rethink how you query data.
Instead of loading a bunch of ids in one query and then stuffing them into an in predicate parameter list in another, why not combine the two queries by using a subquery e.g. from query2 where id in (query1)

Thanks Christian Beikov for responding, subquery might have performance issue that’s i am two deferent query, from first one i am getting list of primary keys and in second query i am using pagination.

Well, apparently it doesn’t work for you to pass 50000 parameters, so I would say that you should maybe re-evaluate what you’re doing.
I’m sure a DBA will help you figure out how to improve performance of the subquery approach.

sure, thanks. If it is not possible then i’ll try to find some other alternate solution.