Forums / Developer / Array sorting / Comment46377

Author Topic

Andrew Kelly

Thursday 27 July 2006 1:41:35 am

Comment46377

Kristof,

sorry, another question:

[me]May I assume that these functions are called from somewhere outside
the datatype itself?[/me]

[Kristof]Yes, they are. The result of the function sortKey is stored in the db
ezcontentobject_attribute table in the field sort_key_text or
sort_key_int, depending on what the sortKeyType function returns.
eZContentObjectTreeNode::createSortingSQLStrings will know which field to
use by calling sortKeyType.[/Kristof]

When are these sortKeys persisted to the DB?
When sorting works correctly, I'll have several thousand records to import. Do I need
to worry about the sort_key attributes with each record, or is that handled
by the core during normal object creation?

Andy