Forums / Developer / Sorting by same attribute in several classes

Sorting by same attribute in several classes

Author Message

Imobach González Sosa

Tuesday 18 May 2004 4:19:16 pm

Hi all,

I'm interested in sorting a couple of objects from different classes using a common attribute. For example:

class1 has attributes a1, a2 and x; and class2 has attributes a b1, b2 and x, too. Right?
What I wanna do is sorting objects using "x" attribute.

Any ideas?

Thank you in advance.

Rinze Cats

Wednesday 19 May 2004 12:36:25 am

Hi,

maybe you can fetch your objects using an attribute filter on attribute x. Sort commands can be included in the fetch.

greetz
rinze

eZ debug

Timing: Jan 18 2025 22:28:17
Script start
Timing: Jan 18 2025 22:28:17
Module start 'content'
Timing: Jan 18 2025 22:28:17
Module end 'content'
Timing: Jan 18 2025 22:28:17
Script end

Main resources:

Total runtime0.0386 sec
Peak memory usage2,048.0000 KB
Database Queries4

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0083 587.8438180.8125
Module start 'content' 0.00830.0142 768.656393.8203
Module end 'content' 0.02250.0160 862.476670.7031
Script end 0.0386  933.1797 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00369.3256120.0003
Check MTime0.00112.8277120.0001
Mysql Total
Database connection0.00081.951810.0008
Mysqli_queries0.00379.504040.0009
Looping result0.00000.083320.0000
Template Total0.015439.810.0154
Template load0.00112.827110.0011
Template processing0.014336.994510.0143
Override
Cache load0.00082.027110.0008
General
dbfile0.007519.2895100.0007
String conversion0.00000.025330.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/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