Foren

Dynamic Query "In' function not working on 6.0.12

Andy Harb, geändert vor 12 Jahren.

Dynamic Query "In' function not working on 6.0.12

Junior Member Beiträge: 66 Beitrittsdatum: 22.10.09 Neueste Beiträge
Hi,

We are in the process of upgrading our portlets from 5.2.6 into the 6.0.12 framework. Everything is going well except I hit a snag when trying to port over code that uses DynamicQuery Class:

// This and 3 other places we use the "in" are causing issues. This worked in 5.2.6
searchQuery.add(PropertyFactoryUtil.forName("categoryId").in(categoriesToSearch));


categoriesToSearch is a List<Integer> so the overloaded in method that accepts Collection should work.

Throws an error:
273: cannot find symbol
    [javac] symbol  : method in(java.util.List<java.lang.integer>)
    [javac] location: interface com.liferay.portal.kernel.dao.orm.Property
    [javac]     searchQuery.add(PropertyFactoryUtil.forName("categoryId").in(categoriesToSearch));
</java.lang.integer>


I was wondering if this method was not brought over or if I need to change anything for 6.0.12. If anyone else has experienced this issue and solved it please let me know.

Thank you for your time.
Andy
Andy Harb, geändert vor 12 Jahren.

RE: Dynamic Query "In' function not working on 6.0.12

Junior Member Beiträge: 66 Beitrittsdatum: 22.10.09 Neueste Beiträge
Just a quick note the in(Object [] ) method is working as expected