File tree Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Expand file tree Collapse file tree 1 file changed +1
-2
lines changed Original file line number Diff line number Diff line change @@ -420,7 +420,6 @@ public abstract with sharing class fflib_SObjectSelector
420420 // Parse the getOrderBy()
421421 for (String orderBy : getOrderBy ().split (' ,' ))
422422 {
423- // TODO: Handle NULLS FIRST and NULLS LAST, http://www.salesforce.com/us/developer/docs/soql_sosl/Content/sforce_api_calls_soql_select_orderby.htm
424423 List <String > orderByParts = orderBy .trim ().split (' ' );
425424 String fieldNamePart = orderByParts [0 ];
426425 String fieldSortOrderPart = orderByParts .size () > 1 ? orderByParts [1 ] : null ;
@@ -431,7 +430,7 @@ public abstract with sharing class fflib_SObjectSelector
431430 fieldSortOrder = fflib_QueryFactory .SortOrder .DESCENDING ;
432431 else if (fieldSortOrderPart .equalsIgnoreCase (' ASC' ))
433432 fieldSortOrder = fflib_QueryFactory .SortOrder .ASCENDING ;
434- queryFactory .addOrdering (fieldNamePart , fieldSortOrder );
433+ queryFactory .addOrdering (fieldNamePart , fieldSortOrder , orderBy . containsIgnoreCase ( ' NULLS LAST ' ) );
435434 }
436435
437436 queryFactory .setSortSelectFields (m_sortSelectFields );
You can’t perform that action at this time.
0 commit comments