bytefold
Monday, 19 August 2013
Not In query In Liferay Dynamic Query
In liferay dynamic query you can create a query for not in condition like
"SELECT * FROM traders WHERE traderId NOT IN(455,466)"
dynamicQuery.add(PropertyFactoryUtil.forName("primaryKey.traderId").notIn( StatutoryLocalServiceUtil.dynamicQuery() .add(PropertyFactoryUtil.forName("primaryKey.traderId").eq(455)) .add(PropertyFactoryUtil.forName("primaryKey.traderId").eq(456)) .setProjection(ProjectionFactoryUtil.property("primaryKey.traderId")) ));
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment