How to fetch objects by owner

Author Message

Eirik Alfstad Johansen

Thursday 04 December 2003 1:31:58 am

Hi,

I saw someone asking the same question a while ago, but since he didn't get a reply, I thought I would try again.

Is it possible to fetch objects by a specific owner using the fetch function? I would be very surprised if it isn't, but after going through the function definition for the content module, I can find no such parameter to sort by. I was thinking that the attribute_filter might be able to do this, but it only seems to handle class-specific attributes.

Next, I considered the extended_attribute_filer, but since there doesn't seem to be any documentation on this parameter, I'm stuck here as well.

I could of course do a general fetch of all the objects and then sort out the ones owned by the reader while looping through them, but that seems like unnecessary overload. Also, I can't belive that fetching objects by owner isn't very common.

Thanks in advance for any insight !

Sincerely,

Eirik Johansen
Netmaking AS

http://www.netmaking.no/

Sincerely,

Eirik Alfstad Johansen
http://www.netmaking.no/

Bård Farstad

Thursday 04 December 2003 4:06:04 am

It's not currently supported to filter results based on the owner of the object. The fetch function would need to add a parameter for this. E.g. owner_filer, 42.

The underlying code ( persitent objects ) has ready support for this.

So, it's not supported. But not much coding needed to add support for this.

--bård

Documentation: http://ez.no/doc

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 19:19:56
Script start
Timing: Jan 18 2025 19:19:56
Module start 'layout'
Timing: Jan 18 2025 19:19:56
Module start 'content'
Timing: Jan 18 2025 19:19:56
Module end 'content'
Timing: Jan 18 2025 19:19:56
Script end

Main resources:

Total runtime0.0231 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0052 587.9141152.6250
Module start 'layout' 0.00520.0026 740.539139.4453
Module start 'content' 0.00780.0131 779.984489.3203
Module end 'content' 0.02080.0022 869.304730.3047
Script end 0.0230  899.6094 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002510.8105140.0002
Check MTime0.00114.8723140.0001
Mysql Total
Database connection0.00073.128710.0007
Mysqli_queries0.002310.174330.0008
Looping result0.00000.047510.0000
Template Total0.00187.910.0018
Template load0.00104.310410.0010
Template processing0.00083.508810.0008
Override
Cache load0.00062.651510.0006
General
dbfile0.008737.478480.0011
String conversion0.00000.037240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_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