Distinct in extented attribute filter

Author Message

Nicolas Lescure

Wednesday 31 October 2007 4:39:44 am

Hi,

I'm trying to create my own extend attribute filter. I need a SQL "in" (ex : li1.to_contentobject_id in (171,139) ). As I'm fetching on objects relation, the query brings me the same object twice (or more).

The solution is to add a "distinct" in the query. But Can I do that with an extend attribute filter ?

Is there another solution ? Any suggestion ?

I'm using the enhanced object relation datatype(http://ez.no/developer/contribs/datatypes/enhanced_objectrelation) instead of the originale eZ Publish objects relations datatype.

Björn [email protected]

Wednesday 31 October 2007 6:50:48 am

Sorry distinct can`t be used in a extended attribute filter unless you have it in a sub query in your where clause

Looking for a new job? http://www.xrow.com/xrow-GmbH/Jobs
Looking for hosting? http://hostingezpublish.com
-----------------------------------------------------------------------------
GMT +01:00 Hannover, Germany
Web: http://www.xrow.com/

Nicolas Lescure

Sunday 04 November 2007 10:13:48 am

Thank you for your answer, even if it's not what I expected.

I checked the kernel. It seems my problem is solved in eZ Publish 3.10. All queries with extended attribute filter have a "distinct". And you can add fields in the "select", which is not possible in eZ Publish 3.9.x.

I think I'll patch the kernel.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.