Setorder (attribute of property)
From JRapid
(Redirected from Setorder)
The "setorder" attribute is used in embedded properties which specify a collection attribute of type set. This attribute specifies the name of the property by which the collection will be sorted when retrieved from database.
Contents |
Usage
<property ... collection = "set" setorder = COLUMN_NAME .../>
- setorder = The property of the embedded entity by which de collection will be sorted.
Caution
When using "setorder", the child entity must implement java.lang.Comparable.
Example
In this example the "image" embedded property of the "Product" entity specifies a "setorder" attribute which sorts the images by their description.
<entity label="Product" menu="Products" name="Product">
...
<property childproperty="product" collection="set" embedded="inline"
entity="ProductImage" extendable="extendable" height="100" label="Image" labelposition="top"
name="image" setorder="description" width="100"/>
...
</entity>
