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