12 June, 2012

service.xml file with order by clause


The attributes of the order-column element allows you to fine tune the ordering
of the entity.


<order by="asc">
<order-column name="title" />
</order>
The above settings will order by title in an ascending manner.
<order by="asc"><order-column name="parentLayoutId" />
<order-column name="priority" />

</order>


The above settings will order by parentLayoutId and then by priority in an ascending manner.
<order by="asc">
<order-column name="name" case-sensitive="false" />
</order>

The above settings will order by name and will not be case sensitive.
<order>
<order-column name="articleId" order-by="asc" />
<order-column name="version" order-by="desc" />
</order>

The above settings will order by articleId in an ascending manner and then by
version in a descending manner.

Popular Posts

Featured Post

Liferay 7.3 compatibility matrix

Compatibility Matrix Liferay's general policy is to test Liferay Portal CE against newer major releases of operating systems, open s...