SELECTn0.pathASn0_path,n0.identifierASn0_identifier,n0.propsASn0_propsFROMphpcr_nodesn0WHEREn0.workspace_name=?ANDn0.typeIN ('nt:unstructured','rep:root') AND (n0.pathLIKE'/cmf/website/contents/%'ORn0.path='/cmf/website/contents') ORDER BYCAST((xpath('//sv:property[@sv:name="sulu:order"]/sv:value[1]/text()',CAST(n0.numerical_propsASxml),ARRAY[ARRAY['sv','http://www.jcp.org/jcr/sv/1.0']]))[1]::textASDECIMAL) ASC, (xpath('//sv:property[@sv:name="sulu:order"]/sv:value[1]/text()',CAST(n0.propsASxml),ARRAY[ARRAY['sv','http://www.jcp.org/jcr/sv/1.0']]))[1]::textASC
SELECTn0.pathASn0_path,n0.identifierASn0_identifier,n0.propsASn0_propsFROMphpcr_nodesn0WHEREn0.workspace_name='default'ANDn0.typeIN ('nt:unstructured','rep:root') AND (n0.pathLIKE'/cmf/website/contents/%'ORn0.path='/cmf/website/contents') ORDER BYCAST((xpath('//sv:property[@sv:name="sulu:order"]/sv:value[1]/text()',CAST(n0.numerical_propsASxml),ARRAY[ARRAY['sv','http://www.jcp.org/jcr/sv/1.0']]))[1]::textASDECIMAL) ASC, (xpath('//sv:property[@sv:name="sulu:order"]/sv:value[1]/text()',CAST(n0.propsASxml),ARRAY[ARRAY['sv','http://www.jcp.org/jcr/sv/1.0']]))[1]::textASC;