掲示板

How to pass arrays of Ids in dynamic query fetch list user ?

6年前 に RAVI RAJAMANI によって更新されました。

How to pass arrays of Ids in dynamic query fetch list user ?

Regular Member 投稿: 123 参加年月日: 14/12/07 最新の投稿
Hi,

I can able to pass a ids to dynamic query.
long[] dddIds= {2863245995L, 11453115051L};

DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Custoxxxx.class, PortletClassLoaderUtil.getClassLoader();
dynamicQuery.add(PropertyFactoryUtil.forName("xxxId").eq(new Long(10931));


How to pass a array of long ids in dynamic query.
thumbnail
6年前 に David H Nebinger によって更新されました。

RE: How to pass arrays of Ids in dynamic query fetch list user ?

Liferay Legend 投稿: 14919 参加年月日: 06/09/02 最新の投稿
I don't think you can do it using a direct property limit, but you have to use the RestrictionsFactoryUtil.in() to use the list.
thumbnail
6年前 に Olaf Kock によって更新されました。

RE: How to pass arrays of Ids in dynamic query fetch list user ?

Liferay Legend 投稿: 6403 参加年月日: 08/09/23 最新の投稿
RAVI RAJAMANI:
I can able to pass a ids to dynamic query.
long[] dddIds= {2863245995L, 11453115051L};

DynamicQuery dynamicQuery = DynamicQueryFactoryUtil.forClass(Custoxxxx.class, PortletClassLoaderUtil.getClassLoader();
dynamicQuery.add(PropertyFactoryUtil.forName("xxxId").eq(new Long(10931));


How to pass a array of long ids in dynamic query.


Too bad that you didn't report back that you already found your answer 9 hours ago. This causes duplicate work, and in the end frustration when someone figures out that all their free support was not needed.

Please make sure to link your crossposts next time, or better: Don't crosspost in the first place.