Setorder (attribute of property)

From JRapid

(Redirected from Setorder)
Jump to: navigation, search

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.



 <property ... collection = "set" setorder = COLUMN_NAME .../> 
  • setorder = The property of the embedded entity by which de collection will be sorted.


When using "setorder", the child entity must implement java.lang.Comparable.


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"/>

Setorder example

See also

Personal tools