Reverse fetch on multiple selection

Author Message

paul bolger

Tuesday 30 November 2010 2:09:45 pm

Can anyone suggest a way to do this?

I have customised member objects: Bill and Ben. The objects have a selection attribute: apples, oranges, bananas - with multiple selections enabled.

I can fetch forwards easily: "Bill likes apples and bananas", but I can't figure out how to fetch in reverse: "Oranges are liked by Ben (only)".

Is there a sane way to achieve this, or should I just resort to related objects?

Paul Bolger

Peter Keung

Tuesday 30 November 2010 6:23:05 pm

3 options:

- eZ Find fetch
- Write an extended attribute filter
- Convert to an "Object relations" attribute (and potentially also use an extended attribute filter, depending on the sophistication of your fetching needs)

http://www.mugo.ca
Mugo Web, eZ Partner in Vancouver, Canada

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 04:21:45
Script start
Timing: Jan 18 2025 04:21:45
Module start 'layout'
Timing: Jan 18 2025 04:21:45
Module start 'content'
Timing: Jan 18 2025 04:21:46
Module end 'content'
Timing: Jan 18 2025 04:21:46
Script end

Main resources:

Total runtime0.6523 sec
Peak memory usage4,096.0000 KB
Database Queries54

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0054 589.1484152.6406
Module start 'layout' 0.00540.0031 741.789139.4688
Module start 'content' 0.00840.6427 781.2578530.6484
Module end 'content' 0.65110.0011 1,311.90638.1563
Script end 0.6522  1,320.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00300.4590160.0002
Check MTime0.00140.2105160.0001
Mysql Total
Database connection0.00090.137710.0009
Mysqli_queries0.608893.3297540.0113
Looping result0.00050.0725520.0000
Template Total0.626996.120.3134
Template load0.00160.250420.0008
Template processing0.625295.856820.3126
Template load and register function0.00010.016610.0001
states
state_id_array0.00100.147210.0010
state_identifier_array0.00070.105520.0003
Override
Cache load0.00140.2076140.0001
Sytem overhead
Fetch class attribute can translate value0.00080.115620.0004
Fetch class attribute name0.00200.306740.0005
XML
Image XML parsing0.00110.167820.0005
class_abstraction
Instantiating content class attribute0.00000.001040.0000
General
dbfile0.00100.1508230.0000
String conversion0.00000.002040.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
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
3content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 10
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs