- All Implemented Interfaces:
- Serializable, org.apache.ojb.broker.accesslayer.QueryCustomizer, org.apache.ojb.broker.metadata.AttributeContainer
public class PurapItemQueryCustomizer
extends KualiQueryCustomizerDefaultImpl
This class improves the default order by in OJB by enforcing consistency between Oracle and MySQLs handling of Null values in a
column. Oracle by default sorts nulls last while MySQL does nulls first (i.e. 1,2,3,null MySQL:null,1,2,3; Oracle:1,2,3,null To
get Mysql to sort correctly we need to negate the field that is being Sorted on (i.e. ORDER BY -column DESC = 1,2,3,null while
ORDER BY column DESC = 3,2,1,null) the oracle default for ORDER BY is "NULLS LAST" which the above MySQL tweak should make it
like. This could be improved to pass in nullsFirst to decide which way to display but that would be beyond what ojb currently
does
- See Also:
- Serialized Form