Back to top

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
documentation:rack:reference:models [2018/05/26 15:34] Martijn Luinstradocumentation:rack:reference:models [2018/05/27 03:01] – [Basic querying & filtering] Martijn Luinstra
Line 31: Line 31:
   * **isnull**: Tests if the field value is ''NULL'' (if <php>'field__isnull'=>true</php>) or not ''NULL'' (if <php>'field__isnull'=>false</php>).    * **isnull**: Tests if the field value is ''NULL'' (if <php>'field__isnull'=>true</php>) or not ''NULL'' (if <php>'field__isnull'=>false</php>). 
  
-If the comparison function is omitted (<php>'field' => $value</php>), the default of **eq** is used. +If the comparison function is omitted (<php>'field' => $value</php>), the default of **eq** is used.
  
 +The <php>get</php> function also supports custom ordering by passing a list of field names. Descending ordering can be achieved by adding a minus in front of the field name. The following example will order first by study and then by birthdate in descending ordering: <php>['study', '-birthdate']</php>.
 ===== Functions ===== ===== Functions =====
  

documentation/rack/reference/models.txt · Last modified: 2023/08/31 23:19 by Martijn Luinstra