Forums / General / Fetch with sort_by on enum datatype attribute

Fetch with sort_by on enum datatype attribute

Author Message

Veronique Jamilloux

Monday 10 May 2010 10:38:42 am

Hi,

I would like to do a fetch with a multiple attribute sorting, but one of my attribute is an enum datatype.

I write this line :

set $children=fetch('content','list',hash('parent_node_id', $node.node_id,
'offset', $view_parameters.offset,
'sort_by', array( array( 'attribute',false(),'urgi_news_event/publish_date' ), array( 'attribute',false(),'urgi_news_event/nature' ) ),
'limit', $page_limit))}

where urgi_news_event/nature is the enum datatype with style=radio buttons.

but when I try that, I don't have any list, there is an Error: eZDataType::loadAndRegisterType Datatype not found: ' '

and in the generated mysql command I find this ORDER BY instruction : ORDER BY a0.sort_key_int DESC, a1.sort_key_int DESC. It takes the 2 attributes sorting.

So what is the problem?

Is there an other way to do my fetch with a sorting on enum datatype attribute?

Tanks a lot for your answers.

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

Veronique Jamilloux

Saturday 15 May 2010 7:21:29 am

hi,

No body can give me some information about my little problem?

Thanks for your help

Véronique

URGI - INRA
Webmaster
Route de Saint Cyr
78000 Versailles

eZ debug

Timing: Jan 29 2025 13:35:54
Script start
Timing: Jan 29 2025 13:35:54
Module start 'content'
Timing: Jan 29 2025 13:35:54
Module end 'content'
Timing: Jan 29 2025 13:35:54
Script end

Main resources:

Total runtime0.0191 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 588.2578180.8203
Module start 'content' 0.00680.0053 769.078193.9922
Module end 'content' 0.01210.0069 863.070370.7031
Script end 0.0190  933.7734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002211.5963120.0002
Check MTime0.00115.5999120.0001
Mysql Total
Database connection0.00105.313610.0010
Mysqli_queries0.003015.875740.0008
Looping result0.00000.083820.0000
Template Total0.006533.910.0065
Template load0.00084.128110.0008
Template processing0.005729.781810.0057
Override
Cache load0.00062.916310.0006
General
dbfile0.002613.5584100.0003
String conversion0.00000.030030.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs