Restricting ObjectRelation to objects of certain classes

Author Message

Ulrich L.

Friday 29 April 2005 6:24:11 am

Hi,
when using the class attribute ObjectrelationList, you have the possibility to restrict the choice of objects to certain classes specified in the class definition.
However, when using the class attribute ObjectRelation for a single relation, I am missing such a restriction. What is the reason? Is there a way to define a single ObjectRelation with such a class restriction? (Since I'm still a newbie I don't want to deal with thirdparty stuff like AdvancedObjectsRelations)

Xavier Dutoit

Sunday 01 May 2005 7:53:12 am

I'd be interested to know why you're afraid of using contribs like AdvancedObjectRelations.

That's not that complicated to install extensions, and I think the doc I wrote on aor isn't that frighting, is it ?

X+

http://www.sydesy.com

Ulrich L.

Monday 02 May 2005 8:00:00 am

Xavier,
sorry for my scepticism... perhaps I really should make a try. First, I have some questions:

1. I have a test installation already running. Can I add (and remove) EnhancedObjectRelations now without affecting the existing data structures (my own classes which use normal object relations included)?

2. Can I use normal ObjectRelation and EnhancedObjectRelations simultaneously in parallel(e.g. for testing)?

3. Does EnhancedObjectRelations provide every feature usually covered by normal ObjectRelation and ObjectRelationList?

4. Do I understand you right that EnhancedObjectRelation provides the feature I'm looking for in this thread (restricting single relations to certain classes)?

5. @ezTeam (somebody of ez reading this thread?): Will the special features of EnhancedObjectRelations be integrated in a forthcoming standard release?

Thanks,
Uli

Xavier Dutoit

Monday 02 May 2005 10:27:37 am

Hi,

I don't want to force you to try eor, just try to understand what stops you from trying.

Yes, you can add (and remove) EnhancedObjectRelations without altering your own classes which use normal object relations included. You have to run a simple sql query on your database, but it doesn't change the behavior of the rest of the ez application.

You can use normal ObjectRelation and EnhancedObjectRelations simultaneously in parallel.

I think EnhancedObjectRelations provides every feature usually covered by normal ObjectRelation and ObjectRelationList. Tell me if it isn't the case.

Enhancedobjectrelation let you define how to select the attachable objects (class or children of a parent node).

X+

P.S. The pubsvn version is more up to date than the tgz file.

http://www.sydesy.com

Ulrich L.

Friday 10 June 2005 3:52:50 am

Xavier,
do you think the new features concerning object relations of 3.6 cover what EOR was originally made for?

Xavier Dutoit

Friday 10 June 2005 6:25:59 am

No,

As far as I know, it resolves the reverse related link and add coherency (if a is related to b and you delete b, it deletes the relation in a).

However, all the improvments on the user interface are not make their way to the 3.6.

On the pro side, one has reported to me that you don't have to modify the database to install eor.

If you give it a try, could you confirm it to me ?

X+

http://www.sydesy.com

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 19 2025 01:09:42
Script start
Timing: Jan 19 2025 01:09:42
Module start 'layout'
Timing: Jan 19 2025 01:09:42
Module start 'content'
Timing: Jan 19 2025 01:09:43
Module end 'content'
Timing: Jan 19 2025 01:09:43
Script end

Main resources:

Total runtime1.0112 sec
Peak memory usage4,096.0000 KB
Database Queries66

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 590.5313152.6563
Module start 'layout' 0.00530.0028 743.187539.5078
Module start 'content' 0.00811.0013 782.6953567.3516
Module end 'content' 1.00930.0018 1,350.046916.0938
Script end 1.0112  1,366.1406 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00370.3643160.0002
Check MTime0.00150.1493160.0001
Mysql Total
Database connection0.00080.078210.0008
Mysqli_queries0.942193.1632660.0143
Looping result0.00070.0682640.0000
Template Total0.981897.120.4909
Template load0.00210.210020.0011
Template processing0.979696.878420.4898
Template load and register function0.00020.022310.0002
states
state_id_array0.00070.070010.0007
state_identifier_array0.00160.155920.0008
Override
Cache load0.00180.1768420.0000
Sytem overhead
Fetch class attribute can translate value0.00100.095920.0005
Fetch class attribute name0.00190.188070.0003
XML
Image XML parsing0.00170.165920.0008
class_abstraction
Instantiating content class attribute0.00000.002190.0000
General
dbfile0.00070.0707160.0000
String conversion0.00000.000840.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
6content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
4content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 22
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs