Message7546
On Mon, May 30, 2022 at 09:35:15PM +0000, John Rouillard wrote:
>
> Also this is documented in customizing.txt:
>
> Note that if an "order" property is defined on a Class that is used for
> sorting, all items of that Class *must* have a value against the "order"
> property, or sorting will result in random ordering.
>
> Is this still valid for items without a valid order property?
Hmm, I don't think this has ever been valid but looking through the
tests I'm not so sure. We *do* test for Link values being NULL on
sorting and generate complicated SQL for postgresql to match the default
sort order of NULL values of mysql (it sorts NULL values *last*).
But I'm not sure we do the same for non-Link properties. So maybe we
create an issue on this to investigate. It may well be that the
different SQL backends behave differently:
The python2 postgresql backend sorts NULL values in order attributes
*first* (in the index view of a class) and python3 behaviour hasn't
changed. So it might well be that postgres sorts NULL first while mysql
sorts NULL last and the above statement comes from that observation. I
still find "NULL first" the more intuitive behaviour.
Ralf
--
Dr. Ralf Schlatterbeck Tel: +43/2243/26465-16
Open Source Consulting www: www.runtux.com
Reichergasse 131, A-3411 Weidling email: office@runtux.com |
|
Date |
User |
Action |
Args |
2022-05-31 07:17:27 | schlatterbeck | set | recipients:
+ schlatterbeck, rouilj |
2022-05-31 07:17:27 | schlatterbeck | link | issue2551207 messages |
2022-05-31 07:17:27 | schlatterbeck | create | |
|