|
2 | 2 | Customising Roundup |
3 | 3 | =================== |
4 | 4 |
|
5 | | -:Version: $Revision: 1.151 $ |
| 5 | +:Version: $Revision: 1.152 $ |
6 | 6 |
|
7 | 7 | .. This document borrows from the ZopeBook section on ZPT. The original is at: |
8 | 8 | http://www.zope.org/Documentation/Books/ZopeBook/current/ZPT.stx |
@@ -578,6 +578,25 @@ Create an item in the database. This is generally used to create items |
578 | 578 | in the "definitional" classes like "priority" and "status". |
579 | 579 |
|
580 | 580 |
|
| 581 | +A note about ordering |
| 582 | +~~~~~~~~~~~~~~~~~~~~~ |
| 583 | + |
| 584 | +When we sort items in the hyperdb, we use one of a number of methods, |
| 585 | +depending on the properties being sorted on: |
| 586 | + |
| 587 | +1. If it's a String, Number, Date or Interval property, we just sort the |
| 588 | + scalar value of the property. Strings are sorted case-sensitively. |
| 589 | +2. If it's a Link property, we sort by either the linked item's "order" |
| 590 | + property (if it has one) or the linked item's "id". |
| 591 | +3. Mulitlinks sort similar to #2, but we start with the first Multilink |
| 592 | + list item, and if they're the same, we sort by the second item, and |
| 593 | + so on. |
| 594 | + |
| 595 | +Note that if an "order" property is defined on a Class that is used for |
| 596 | +sorting, all items of that Class *must* have a value against the "order" |
| 597 | +property, or sorting will result in random ordering. |
| 598 | + |
| 599 | + |
581 | 600 | Examples of adding to your schema |
582 | 601 | --------------------------------- |
583 | 602 |
|
|
0 commit comments