svn commit: r612873 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r612873 - /ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java

sichen
Author: sichen
Date: Thu Jan 17 09:09:53 2008
New Revision: 612873

URL: http://svn.apache.org/viewvc?rev=612873&view=rev
Log:
ofbiz 1571 from Jeremy Wickersheimer: fix product keyword search sql error

Modified:
    ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java

Modified: ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java?rev=612873&r1=612872&r2=612873&view=diff
==============================================================================
--- ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java (original)
+++ ofbiz/trunk/applications/product/src/org/ofbiz/product/product/ProductSearch.java Thu Jan 17 09:09:53 2008
@@ -297,6 +297,10 @@
                     entityConditionList.add(new EntityExpr(prefix + "Keyword", EntityOperator.LIKE, keyword));
 
                     //don't add an alias for this, will be part of a complex alias: dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, null, null);
+                    //needed when doingBothAndOr or will get an SQL error
+                    if (doingBothAndOr) {
+                        dynamicViewEntity.addAlias(entityAlias, prefix + "RelevancyWeight", "relevancyWeight", null, null, Boolean.TRUE, null);
+                    }
                     relevancyComplexAlias.addComplexAliasMember(new ComplexAliasField(entityAlias, "relevancyWeight", null, null));
                 }