related_objects: objects related by attributes only

Author Message

paul bolger

Sunday 25 February 2007 9:09:52 pm

Is it possible to fetch only related objects which are related by attribute, and not those related at object level?

I've tried fiddling with 'attribute_identifier' and 'all_relations' but no joy so far.

Paul Bolger

Xavier Dutoit

Monday 26 February 2007 5:50:43 am

The 'attribute_identifier' is what you want. the syntax is "news/country" (assuming country is a related object attribute of the class news).

X+

http://www.sydesy.com

paul bolger

Monday 26 February 2007 4:22:17 pm

I was wondering if there is a generic 'related by attribute' method

Kind of the opposite of 'all_relations FALSE'

It would mean I could recycle the template for a few different situations, rather than have different ones for each class.

paul bolger

Paul Bolger

Kristof Coomans

Monday 26 February 2007 11:05:59 pm

Hi Paul

Did you try the group_by_attribute parameter?

http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/related_objects

independent eZ Publish developer and service provider | http://blog.coomanskristof.be | http://ezpedia.org

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

eZ debug

Timing: Jan 18 2025 22:35:42
Script start
Timing: Jan 18 2025 22:35:42
Module start 'layout'
Timing: Jan 18 2025 22:35:42
Module start 'content'
Timing: Jan 18 2025 22:35:42
Module end 'content'
Timing: Jan 18 2025 22:35:42
Script end

Main resources:

Total runtime0.7818 sec
Peak memory usage4,096.0000 KB
Database Queries62

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0060 589.5703152.6406
Module start 'layout' 0.00600.0032 742.210939.4766
Module start 'content' 0.00920.7712 781.6875590.4609
Module end 'content' 0.78030.0014 1,372.148412.1250
Script end 0.7817  1,384.2734 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.4059160.0002
Check MTime0.00130.1647160.0001
Mysql Total
Database connection0.00120.148910.0012
Mysqli_queries0.727092.9964620.0117
Looping result0.00060.0754600.0000
Template Total0.751696.120.3758
Template load0.00210.268620.0010
Template processing0.749595.868020.3747
Template load and register function0.00010.014110.0001
states
state_id_array0.00070.086210.0007
state_identifier_array0.00100.122520.0005
Override
Cache load0.00180.2346210.0001
Sytem overhead
Fetch class attribute can translate value0.00070.093330.0002
Fetch class attribute name0.00090.114670.0001
XML
Image XML parsing0.00150.187530.0005
class_abstraction
Instantiating content class attribute0.00000.001880.0000
General
dbfile0.00160.1996280.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 14
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs